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

Unified Diff: chrome/common/extensions/docs/server2/commit_tracker.py

Issue 660383002: Docserver: Persist stat cache for versioned file systems (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change caching strategy, better refresh cycle synchronization Created 6 years, 2 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: chrome/common/extensions/docs/server2/commit_tracker.py
diff --git a/chrome/common/extensions/docs/server2/commit_tracker.py b/chrome/common/extensions/docs/server2/commit_tracker.py
new file mode 100644
index 0000000000000000000000000000000000000000..5c3d5a602a4b420b6a86470b86d3a5bf167f5d3d
--- /dev/null
+++ b/chrome/common/extensions/docs/server2/commit_tracker.py
@@ -0,0 +1,19 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from object_store_creator import ObjectStoreCreator
+from future import Future
+
+
+class CommitTracker(object):
+ '''Utility class for managing and querying the storage of various named commit
+ IDs.'''
+ def __init__(self, object_store_creator):
+ self._store = object_store_creator.Create(str, category='commits')
+
+ def Get(self, key):
+ return self._store.Get(key)
+
+ def Set(self, key, commit):
+ return self._store.Set(key, commit)

Powered by Google App Engine
This is Rietveld 408576698