##// END OF EJS Templates
fix(cache-invalidation): fixed case when empty repos once cached wouldn't invalidate caches because of empty case condition
super-admin -
r5300:eaec72ab default
parent child Browse files
Show More
@@ -2634,12 +2634,11 b' class Repository(Base, BaseModel):'
2634 2634
2635 2635 previous_state_uid, instance = cache_func(*args)
2636 2636
2637 if instance:
2638 # now compare keys, the "cache" state vs expected state.
2639 if previous_state_uid != cache_state_uid:
2640 log.warning('Cached state uid %s is different than current state uid %s',
2641 previous_state_uid, cache_state_uid)
2642 _, instance = cache_func.refresh(*args)
2637 # now compare keys, the "cache" state vs expected state.
2638 if previous_state_uid != cache_state_uid:
2639 log.warning('Cached state uid %s is different than current state uid %s',
2640 previous_state_uid, cache_state_uid)
2641 _, instance = cache_func.refresh(*args)
2643 2642
2644 2643 log.debug('Repo instance fetched in %.4fs', inv_context_manager.compute_time)
2645 2644 return instance
@@ -2652,6 +2651,7 b' class Repository(Base, BaseModel):'
2652 2651 'cache': cache, # controls the vcs.remote cache
2653 2652 'repo_state_uid': repo_state_uid
2654 2653 }
2654
2655 2655 repo = get_vcs_instance(
2656 2656 repo_path=safe_str(self.repo_full_path),
2657 2657 config=config,
General Comments 0
You need to be logged in to leave comments. Login now