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

Unified Diff: chrome/common/extensions/docs/server2/file_system.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, 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/file_system.py
diff --git a/chrome/common/extensions/docs/server2/file_system.py b/chrome/common/extensions/docs/server2/file_system.py
index c0c8551e88957237d16eb6fd3f8d88b96052e747..1cbeb75ab07a22fc5a7b55b4f43a8978d9ee7aa6 100644
--- a/chrome/common/extensions/docs/server2/file_system.py
+++ b/chrome/common/extensions/docs/server2/file_system.py
@@ -160,13 +160,21 @@ class FileSystem(object):
def GetIdentity(self):
'''The identity of the file system, exposed for caching classes to
- namespace their caches. this will usually depend on the configuration of
+ namespace their caches. This will usually depend on the configuration of
that file system - e.g. a LocalFileSystem with a base path of /var is
different to that of a SubversionFileSystem with a base path of /bar, is
different to a LocalFileSystem with a base path of /usr.
'''
raise NotImplementedError(self.__class__)
+ def GetVersion(self):
+ '''The version of the file system, exposed for more granular caching.
+ This may be any serializable data, though generally it should be a revision
+ number or hash string. The default implementation returns None, indicating
+ that the FileSystem is not versioned.
+ '''
+ return None
+
def Walk(self, root, depth=-1, file_lister=None):
'''Recursively walk the directories in a file system, starting with root.
« no previous file with comments | « chrome/common/extensions/docs/server2/cron_servlet.py ('k') | chrome/common/extensions/docs/server2/gitiles_file_system.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698