##// END OF EJS Templates
localrepo: add isfilecached to check filecache-ed property is already cached...
FUJIWARA Katsunori -
r33382:b107a766 default
parent child Browse files
Show More
@@ -104,6 +104,16 b' class storecache(_basefilecache):'
104 def join(self, obj, fname):
104 def join(self, obj, fname):
105 return obj.sjoin(fname)
105 return obj.sjoin(fname)
106
106
107 def isfilecached(repo, name):
108 """check if a repo has already cached "name" filecache-ed property
109
110 This returns (cachedobj-or-None, iscached) tuple.
111 """
112 cacheentry = repo.unfiltered()._filecache.get(name, None)
113 if not cacheentry:
114 return None, False
115 return cacheentry.obj, True
116
107 class unfilteredpropertycache(util.propertycache):
117 class unfilteredpropertycache(util.propertycache):
108 """propertycache that apply to unfiltered repo only"""
118 """propertycache that apply to unfiltered repo only"""
109
119
General Comments 0
You need to be logged in to leave comments. Login now