##// END OF EJS Templates
caches: optimized defaults for safer more reliable behaviour
super-admin -
r951:fbffdae7 default
parent child Browse files
Show More
@@ -29,6 +29,8 b' from dogpile.cache.backends import redis'
29 from dogpile.cache.backends.file import NO_VALUE, compat, FileLock
29 from dogpile.cache.backends.file import NO_VALUE, compat, FileLock
30 from dogpile.cache.util import memoized_property
30 from dogpile.cache.util import memoized_property
31
31
32 from pyramid.settings import asbool
33
32 from vcsserver.lib.memory_lru_dict import LRUDict, LRUDictDebug
34 from vcsserver.lib.memory_lru_dict import LRUDict, LRUDictDebug
33
35
34
36
@@ -194,11 +196,11 b' class BaseRedisBackend(redis_backend.Red'
194 def __init__(self, arguments):
196 def __init__(self, arguments):
195 super(BaseRedisBackend, self).__init__(arguments)
197 super(BaseRedisBackend, self).__init__(arguments)
196 self._lock_timeout = self.lock_timeout
198 self._lock_timeout = self.lock_timeout
197 self._lock_auto_renewal = arguments.pop("lock_auto_renewal", False)
199 self._lock_auto_renewal = asbool(arguments.pop("lock_auto_renewal", True))
198
200
199 if self._lock_auto_renewal and not self._lock_timeout:
201 if self._lock_auto_renewal and not self._lock_timeout:
200 # set default timeout for auto_renewal
202 # set default timeout for auto_renewal
201 self._lock_timeout = 60
203 self._lock_timeout = 30
202
204
203 def _create_client(self):
205 def _create_client(self):
204 args = {}
206 args = {}
General Comments 0
You need to be logged in to leave comments. Login now