# HG changeset patch # User RhodeCode Admin # Date 2024-10-23 09:32:20 # Node ID 16defd511f02f95c2ff6902e8ece3068819d3d4d # Parent 54bb9264889b333f704a18ab8c519c5b180f3e39 fix(caches): actually obey wire cache flag on local method caching diff --git a/rhodecode/lib/vcs/client_http.py b/rhodecode/lib/vcs/client_http.py --- a/rhodecode/lib/vcs/client_http.py +++ b/rhodecode/lib/vcs/client_http.py @@ -293,7 +293,9 @@ class RemoteRepo(object): 'is_path_valid_repository', ] - if local_cache_on and name in cache_methods: + wire_cache = self._wire['cache'] + + if local_cache_on and wire_cache and name in cache_methods: cache_on = True repo_state_uid = self._wire['repo_state_uid'] call_args = [a for a in args] @@ -303,6 +305,7 @@ class RemoteRepo(object): @exceptions.map_vcs_exceptions def _call(self, name, *args, **kwargs): + context_uid, payload = self._base_call(name, *args, **kwargs) url = self.url diff --git a/rhodecode/model/scm.py b/rhodecode/model/scm.py --- a/rhodecode/model/scm.py +++ b/rhodecode/model/scm.py @@ -213,12 +213,10 @@ class ScmModel(BaseModel): try: if name in repos: - raise RepositoryError('Duplicate repository name %s ' - 'found in %s' % (name, path)) + raise RepositoryError(f'Duplicate repository name {name} found in {path}') elif path[0] in rhodecode.BACKENDS: backend = get_backend(path[0]) - repos[name] = backend(path[1], config=config, - with_wire={"cache": False}) + repos[name] = backend(path[1], config=config, with_wire={"cache": False}) except OSError: continue except RepositoryError: