##// END OF EJS Templates
fix(caches): actually obey wire cache flag on local method caching
super-admin -
r5580:16defd51 default
parent child Browse files
Show More
@@ -293,7 +293,9 b' class RemoteRepo(object):'
293 'is_path_valid_repository',
293 'is_path_valid_repository',
294 ]
294 ]
295
295
296 if local_cache_on and name in cache_methods:
296 wire_cache = self._wire['cache']
297
298 if local_cache_on and wire_cache and name in cache_methods:
297 cache_on = True
299 cache_on = True
298 repo_state_uid = self._wire['repo_state_uid']
300 repo_state_uid = self._wire['repo_state_uid']
299 call_args = [a for a in args]
301 call_args = [a for a in args]
@@ -303,6 +305,7 b' class RemoteRepo(object):'
303
305
304 @exceptions.map_vcs_exceptions
306 @exceptions.map_vcs_exceptions
305 def _call(self, name, *args, **kwargs):
307 def _call(self, name, *args, **kwargs):
308
306 context_uid, payload = self._base_call(name, *args, **kwargs)
309 context_uid, payload = self._base_call(name, *args, **kwargs)
307 url = self.url
310 url = self.url
308
311
@@ -213,12 +213,10 b' class ScmModel(BaseModel):'
213
213
214 try:
214 try:
215 if name in repos:
215 if name in repos:
216 raise RepositoryError('Duplicate repository name %s '
216 raise RepositoryError(f'Duplicate repository name {name} found in {path}')
217 'found in %s' % (name, path))
218 elif path[0] in rhodecode.BACKENDS:
217 elif path[0] in rhodecode.BACKENDS:
219 backend = get_backend(path[0])
218 backend = get_backend(path[0])
220 repos[name] = backend(path[1], config=config,
219 repos[name] = backend(path[1], config=config, with_wire={"cache": False})
221 with_wire={"cache": False})
222 except OSError:
220 except OSError:
223 continue
221 continue
224 except RepositoryError:
222 except RepositoryError:
General Comments 0
You need to be logged in to leave comments. Login now