Comments
Patch
@@ -164,3 +164,20 @@
def _fetchupdatedata(self, repo):
return self._fetchchangelogdata(self._cachekey, repo.changelog)
+
+class obsstoresourcebase(incrementalcachebase):
+ """an abstract class for cache that source data from the obsstore
+
+ For this purpose it use a cache key covering obsstore
+ content provided by the obsstore itself
+ """
+
+ __metaclass__ = abc.ABCMeta
+
+ # default key used for an empty cache
+ emptykey = (0, node.nullid)
+ _cachekeyspec = 'I20s'
+ _cachename = None # used for debug message
+
+ def _fetchupdatedata(self, repo):
+ return repo.obsstore.getmarkerssince(self._cachekey)