chore(rc-cache): synced with CE code
This commit is contained in:
parent
8534f3602b
commit
191d46f64a
2 changed files with 3 additions and 4 deletions
|
|
@ -98,7 +98,7 @@ class PickleSerializer:
|
|||
)
|
||||
|
||||
|
||||
class MsgPackSerializer(object):
|
||||
class MsgPackSerializer:
|
||||
serializer: None | Serializer = staticmethod( # type: ignore
|
||||
msgpack.packb
|
||||
)
|
||||
|
|
@ -291,7 +291,7 @@ class RedisMsgPackBackend(MsgPackSerializer, BaseRedisBackend):
|
|||
def get_mutex_lock(client, lock_key, lock_timeout, auto_renewal=False):
|
||||
from rhodecode.lib._vendor import redis_lock
|
||||
|
||||
class _RedisLockWrapper(object):
|
||||
class _RedisLockWrapper:
|
||||
"""LockWrapper for redis_lock"""
|
||||
|
||||
@classmethod
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ def isCython(func):
|
|||
class RhodeCodeCacheRegion(CacheRegion):
|
||||
|
||||
def __repr__(self):
|
||||
return f'{self.__class__}(name={self.name})'
|
||||
return f'`{self.__class__.__name__}(name={self.name}, backend={self.backend.__class__})`'
|
||||
|
||||
def conditional_cache_on_arguments(
|
||||
self, namespace=None,
|
||||
|
|
@ -250,7 +250,6 @@ def clear_cache_namespace(cache_region: str | RhodeCodeCacheRegion, cache_namesp
|
|||
|
||||
if method == CLEAR_DELETE:
|
||||
num_affected_keys = cache_region.backend.delete_multi_by_prefix(prefix=cache_namespace_uid)
|
||||
|
||||
return num_affected_keys
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue