# HG changeset patch # User RhodeCode Admin # Date 2024-02-19 08:04:35 # Node ID db210dc1705d6a24e9e7daa7586697645ee9e7a8 # Parent ff82a8537b05e33f4bab8f3dd7019376c82849a0 chore(rc-cache): synced with CE code diff --git a/rhodecode/lib/rc_cache/backends.py b/rhodecode/lib/rc_cache/backends.py --- a/rhodecode/lib/rc_cache/backends.py +++ b/rhodecode/lib/rc_cache/backends.py @@ -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(MsgPackSeriali 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 diff --git a/rhodecode/lib/rc_cache/utils.py b/rhodecode/lib/rc_cache/utils.py --- a/rhodecode/lib/rc_cache/utils.py +++ b/rhodecode/lib/rc_cache/utils.py @@ -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: if method == CLEAR_DELETE: num_affected_keys = cache_region.backend.delete_multi_by_prefix(prefix=cache_namespace_uid) - return num_affected_keys