Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1046)

Unified Diff: packages/quiver/lib/src/cache/cache.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « packages/quiver/lib/src/async/stream_router.dart ('k') | packages/quiver/lib/src/cache/map_cache.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « packages/quiver/lib/src/async/stream_router.dart ('k') | packages/quiver/lib/src/cache/map_cache.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698