##// END OF EJS Templates
caches: fixed filename backend crash by using sanitazed cache_repo_id instead of one with '/' in the name.
super-admin -
r996:3f24ad23 default
parent child Browse files
Show More
@@ -21,8 +21,8 b' class RemoteBase(object):'
21 EMPTY_COMMIT = '0' * 40
21 EMPTY_COMMIT = '0' * 40
22
22
23 def _region(self, wire):
23 def _region(self, wire):
24 repo_id = wire.get('repo_id', '')
24 cache_repo_id = wire.get('cache_repo_id', '')
25 cache_namespace_uid = 'cache_repo.{}'.format(repo_id)
25 cache_namespace_uid = 'cache_repo.{}'.format(cache_repo_id)
26 return rc_cache.get_or_create_region('repo_object', cache_namespace_uid)
26 return rc_cache.get_or_create_region('repo_object', cache_namespace_uid)
27
27
28 def _cache_on(self, wire):
28 def _cache_on(self, wire):
@@ -36,9 +36,10 b' class RemoteBase(object):'
36 def vcsserver_invalidate_cache(self, wire, delete):
36 def vcsserver_invalidate_cache(self, wire, delete):
37 from vcsserver.lib import rc_cache
37 from vcsserver.lib import rc_cache
38 repo_id = wire.get('repo_id', '')
38 repo_id = wire.get('repo_id', '')
39 cache_repo_id = wire.get('cache_repo_id', '')
40 cache_namespace_uid = 'cache_repo.{}'.format(cache_repo_id)
39
41
40 if delete:
42 if delete:
41 cache_namespace_uid = 'cache_repo.{}'.format(repo_id)
42 rc_cache.clear_cache_namespace(
43 rc_cache.clear_cache_namespace(
43 'repo_object', cache_namespace_uid, invalidate=True)
44 'repo_object', cache_namespace_uid, invalidate=True)
44
45
General Comments 0
You need to be logged in to leave comments. Login now