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

Side by Side 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: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 from object_store_creator import ObjectStoreCreator
6 from future import Future
7
8
9 class CommitTracker(object):
10 '''Utility class for managing and querying the storage of various named commit
11 IDs.'''
12 def __init__(self, object_store_creator):
13 # The object store should never be created empty since the sole purpose of
14 # this tracker is to persist named commit data across requests.
15 self._store = object_store_creator.Create(CommitTracker, start_empty=False)
16
17 def Get(self, key):
18 return self._store.Get(key)
19
20 def Set(self, key, commit):
21 return self._store.Set(key, commit)
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/server2/caching_file_system_test.py ('k') | chrome/common/extensions/docs/server2/cron.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698