##// END OF EJS Templates
caches: added method for flush cache for last commit...
marcink -
r3998:b717c948 default
parent child Browse files
Show More
@@ -2298,6 +2298,10 b' class Repository(Base, BaseModel):'
2298 2298 return self.get_commit()
2299 2299 return commit
2300 2300
2301 def flush_commit_cache(self):
2302 self.update_commit_cache(cs_cache={'raw_id':'0'})
2303 self.update_commit_cache()
2304
2301 2305 def update_commit_cache(self, cs_cache=None, config=None):
2302 2306 """
2303 2307 Update cache of last commit for repository, keys should be::
@@ -2351,7 +2355,7 b' class Repository(Base, BaseModel):'
2351 2355 Session().add(self)
2352 2356 Session().commit()
2353 2357
2354 log.debug('updated repo %s with new commit cache %s',
2358 log.debug('updated repo `%s` with new commit cache %s',
2355 2359 self.repo_name, cs_cache)
2356 2360 else:
2357 2361 cs_cache = self.changeset_cache
@@ -2868,7 +2872,7 b' class RepoGroup(Base, BaseModel):'
2868 2872 Session().add(repo_group)
2869 2873 Session().commit()
2870 2874
2871 log.debug('updated repo group %s with new commit cache %s',
2875 log.debug('updated repo group `%s` with new commit cache %s',
2872 2876 repo_group.group_name, latest_repo_cs_cache)
2873 2877
2874 2878 def permissions(self, with_admins=True, with_owner=True,
General Comments 0
You need to be logged in to leave comments. Login now