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

Side by Side Diff: chrome/common/extensions/docs/server2/patched_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: 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 unified diff | Download patch
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from copy import deepcopy 5 from copy import deepcopy
6 6
7 from file_system import FileSystem, StatInfo, FileNotFoundError 7 from file_system import FileSystem, StatInfo, FileNotFoundError
8 from future import Future 8 from future import Future
9 9
10 10
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return self._base_file_system.Stat(path) 143 return self._base_file_system.Stat(path)
144 144
145 if stat_info.child_versions is not None: 145 if stat_info.child_versions is not None:
146 if filename: 146 if filename:
147 if filename in stat_info.child_versions: 147 if filename in stat_info.child_versions:
148 stat_info = StatInfo(stat_info.child_versions[filename]) 148 stat_info = StatInfo(stat_info.child_versions[filename])
149 else: 149 else:
150 raise FileNotFoundError('%s was not in child versions' % filename) 150 raise FileNotFoundError('%s was not in child versions' % filename)
151 return stat_info 151 return stat_info
152 152
153 def GetIdentity(self): 153 def GetStableIdentity(self):
154 return '%s(%s,%s)' % (self.__class__.__name__, 154 return '%s(%s,%s)' % (self.__class__.__name__,
155 self._base_file_system.GetIdentity(), 155 self._base_file_system.GetStableIdentity(),
156 self._patcher.GetIdentity()) 156 self._patcher.GetIdentity())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698