Index: packages/quiver/lib/src/cache/cache.dart |
diff --git a/packages/quiver/lib/src/cache/cache.dart b/packages/quiver/lib/src/cache/cache.dart |
index 55ae64316792596cdc4654cf5dfca07053daf974..dc6e3c32787755374a6bc30063a69c97b5f549ba 100644 |
--- a/packages/quiver/lib/src/cache/cache.dart |
+++ b/packages/quiver/lib/src/cache/cache.dart |
@@ -14,38 +14,27 @@ |
part of quiver.cache; |
-/** |
- * A function that produces a value for [key], for when a [Cache] needs to |
- * populate an entry. |
- * |
- * The loader function should either return a value synchronously or a [Future] |
- * which completes with the value asynchronously. |
- */ |
+/// A function that produces a value for [key], for when a [Cache] needs to |
+/// populate an entry. |
+/// |
+/// The loader function should either return a value synchronously or a |
+/// [Future] which completes with the value asynchronously. |
typedef dynamic Loader<K>(K key); |
-/** |
- * A semi-persistent mapping of keys to values. |
- * |
- * All access to a Cache is asynchronous because many implementations will store |
- * their entries in remote systems, isolates, or otherwise have to do async IO |
- * to read and write. |
- */ |
+/// A semi-persistent mapping of keys to values. |
+/// |
+/// All access to a Cache is asynchronous because many implementations will |
+/// store their entries in remote systems, isolates, or otherwise have to do |
+/// async IO to read and write. |
abstract class Cache<K, V> { |
- |
- /** |
- * Returns the value associated with [key]. |
- */ |
+ /// Returns the value associated with [key]. |
Future<V> get(K key, {Loader<K> ifAbsent}); |
- /** |
- * Sets the value associated with [key]. The Future completes with null when |
- * the operation is complete. |
- */ |
+ /// Sets the value associated with [key]. The Future completes with null when |
+ /// the operation is complete. |
Future set(K key, V value); |
- /** |
- * Removes the value associated with [key]. The Future completes with null |
- * when the operation is complete. |
- */ |
+ /// Removes the value associated with [key]. The Future completes with null |
+ /// when the operation is complete. |
Future invalidate(K key); |
} |