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

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

Issue 10828235: Extensions Docs Server: Efficient MemcacheFileSystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tests! Created 8 years, 4 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/memcache_file_system.py
diff --git a/chrome/common/extensions/docs/server2/memcache_file_system.py b/chrome/common/extensions/docs/server2/memcache_file_system.py
index 5ac407237cabd5055aeee07a1def863a80b4d147..ff4a8668fa22ff93d15b25bc4c8e656395d74289 100644
--- a/chrome/common/extensions/docs/server2/memcache_file_system.py
+++ b/chrome/common/extensions/docs/server2/memcache_file_system.py
@@ -23,8 +23,12 @@ class MemcacheFileSystem(FileSystem):
self._memcache.Set(path,
stat_info.version,
memcache.MEMCACHE_FILE_SYSTEM_STAT)
+ for child_path, child_version in stat_info.child_versions.iteritems():
+ self._memcache.Set(path.rsplit('/', 1)[0] + '/' + child_path,
+ child_version,
+ memcache.MEMCACHE_FILE_SYSTEM_STAT)
else:
- stat_info = self.StatInfo(version)
+ stat_info = self.StatInfo(version, {})
not at google - send to devlin 2012/08/13 05:34:15 memcache can store arbitrary objects, I believe. I
cduvall 2012/08/13 19:45:45 Memcache can store dictionaries, but not objects.
not at google - send to devlin 2012/08/13 23:02:14 I just checked and it looks like pickle can handle
cduvall 2012/08/14 18:15:00 Aha! The problem with pickle was nested classes. I
not at google - send to devlin 2012/08/15 05:24:05 Ok, let's un-nest StatInfo then (or figure out how
return stat_info
def Read(self, paths, binary=False):

Powered by Google App Engine
This is Rietveld 408576698