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

Unified Diff: appengine/datastorecache/handler.go

Issue 2645763002: datastorecache: Add Locker field, public settings. (Closed)
Patch Set: Created 3 years, 11 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 | « appengine/datastorecache/cache_test.go ('k') | appengine/datastorecache/lock.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/datastorecache/handler.go
diff --git a/appengine/datastorecache/handler.go b/appengine/datastorecache/handler.go
index 56c1ead7dbbe5e6f6e3d84c1858a4c7c4fd2cb36..00911bc0f01bf816febff8b24b7fb7d9e26d92d8 100644
--- a/appengine/datastorecache/handler.go
+++ b/appengine/datastorecache/handler.go
@@ -50,4 +50,11 @@ type Handler interface {
// caller. Otherwise, the return value will be used to update the cache
// entity.
Refresh(c context.Context, key []byte, v Value) (Value, error)
+
+ // Locker returns the Locker instance to use.
+ //
+ // The Locker is optional, and serves to prevent multiple independent cache
+ // calls for the same data from each independently refreshing that data. If
+ // Locker returns nil, no such locking will be performed.
+ Locker(c context.Context) Locker
}
« no previous file with comments | « appengine/datastorecache/cache_test.go ('k') | appengine/datastorecache/lock.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698