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

Unified Diff: filter/dscache/dscache.go

Issue 1355783002: Refactor keys and queries in datastore service and implementation. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: Created 5 years, 3 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
Index: filter/dscache/dscache.go
diff --git a/filter/dscache/dscache.go b/filter/dscache/dscache.go
index dd52c0ba69a2d7cb20b2e8fb3dccaba9bb1aa6f8..c4069d50bf7f6a79873439691606e9bd649f8323 100644
--- a/filter/dscache/dscache.go
+++ b/filter/dscache/dscache.go
@@ -101,11 +101,11 @@ const (
ItemHasLock
)
-func MakeMemcacheKey(shard int, k datastore.Key) string {
+func MakeMemcacheKey(shard int, k *datastore.Key) string {
return fmt.Sprintf(KeyFormat, shard, HashKey(k))
}
-func HashKey(k datastore.Key) string {
+func HashKey(k *datastore.Key) string {
dgst := sha1.Sum(serialize.ToBytes(k))
buf := bytes.Buffer{}
enc := base64.NewEncoder(base64.StdEncoding, &buf)

Powered by Google App Engine
This is Rietveld 408576698