Add branch cache ltime to trigger events
In case a project(-branch) cache is cleared we add the cache ltime to the trigger event. This ltime can later be used to determine if the project branch cache needs to be refreshed. Change-Id: I25d2ffb144e3a80856b10c920b42c37ef5ac9235
This commit is contained in:
@@ -192,6 +192,7 @@ class ZKBranchCacheMixin:
|
||||
# but for the moment, implement the lowest common
|
||||
# denominator and clear the cache so that we query.
|
||||
self._branch_cache.clearProjectCache(project.name)
|
||||
event.branch_cache_ltime = self._branch_cache.ltime
|
||||
return event
|
||||
|
||||
def getProjectBranches(self, project, tenant, min_ltime=-1):
|
||||
@@ -273,6 +274,7 @@ class ZKBranchCacheMixin:
|
||||
project_name)
|
||||
self._branch_cache.clearProtectedProjectCache(
|
||||
project_name)
|
||||
event.branch_cache_ltime = self._branch_cache.ltime
|
||||
|
||||
event.branch_protected = protected
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user