# HG changeset patch # User RhodeCode Admin # Date 2022-10-06 08:27:53 # Node ID 3f24ad233d6224934fcc6b49e4c138945d6a4701 # Parent 821e02c45c320c547451677f5fe81a0bcb6c85f6 caches: fixed filename backend crash by using sanitazed cache_repo_id instead of one with '/' in the name. diff --git a/vcsserver/vcs_base.py b/vcsserver/vcs_base.py --- a/vcsserver/vcs_base.py +++ b/vcsserver/vcs_base.py @@ -21,8 +21,8 @@ class RemoteBase(object): EMPTY_COMMIT = '0' * 40 def _region(self, wire): - repo_id = wire.get('repo_id', '') - cache_namespace_uid = 'cache_repo.{}'.format(repo_id) + cache_repo_id = wire.get('cache_repo_id', '') + cache_namespace_uid = 'cache_repo.{}'.format(cache_repo_id) return rc_cache.get_or_create_region('repo_object', cache_namespace_uid) def _cache_on(self, wire): @@ -36,9 +36,10 @@ class RemoteBase(object): def vcsserver_invalidate_cache(self, wire, delete): from vcsserver.lib import rc_cache repo_id = wire.get('repo_id', '') + cache_repo_id = wire.get('cache_repo_id', '') + cache_namespace_uid = 'cache_repo.{}'.format(cache_repo_id) if delete: - cache_namespace_uid = 'cache_repo.{}'.format(repo_id) rc_cache.clear_cache_namespace( 'repo_object', cache_namespace_uid, invalidate=True)