diff options
author | Quentin Gliech <quenting@element.io> | 2023-09-06 16:19:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-06 15:19:51 +0100 |
commit | 1940d990a345b44839039b3f6a9ee3f26757eb0e (patch) | |
tree | dfc28973a2471b23a699cdd510783900881fd92a /synapse/util | |
parent | 1.91.1 (diff) | |
download | synapse-1940d990a345b44839039b3f6a9ee3f26757eb0e.tar.xz |
Revert MSC3861 introspection cache, admin impersonation and account lock (#16258)
Diffstat (limited to 'synapse/util')
-rw-r--r-- | synapse/util/caches/expiringcache.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/synapse/util/caches/expiringcache.py b/synapse/util/caches/expiringcache.py index 9a3e10ddee..01ad02af67 100644 --- a/synapse/util/caches/expiringcache.py +++ b/synapse/util/caches/expiringcache.py @@ -140,20 +140,6 @@ class ExpiringCache(Generic[KT, VT]): return value.value - def invalidate(self, key: KT) -> None: - """ - Remove the given key from the cache. - """ - - value = self._cache.pop(key, None) - if value: - if self.iterable: - self.metrics.inc_evictions( - EvictionReason.invalidation, len(value.value) - ) - else: - self.metrics.inc_evictions(EvictionReason.invalidation) - def __contains__(self, key: KT) -> bool: return key in self._cache @@ -207,14 +193,6 @@ class ExpiringCache(Generic[KT, VT]): len(self), ) - def invalidate_all(self) -> None: - """ - Remove all items from the cache. - """ - keys = set(self._cache.keys()) - for key in keys: - self._cache.pop(key) - def __len__(self) -> int: if self.iterable: return sum(len(entry.value) for entry in self._cache.values()) |