Skip to content
Snippets Groups Projects
Commit 7cd418d3 authored by David Baker's avatar David Baker
Browse files

Don't add the member functiopn if we're not using treecache

parent cd80019e
Branches
Tags
No related merge requests found
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
from functools import wraps from functools import wraps
import threading import threading
from synapse.util.caches.treecache import TreeCache
def enumerate_leaves(node, depth): def enumerate_leaves(node, depth):
if depth == 0: if depth == 0:
...@@ -154,7 +156,8 @@ class LruCache(object): ...@@ -154,7 +156,8 @@ class LruCache(object):
self.set = cache_set self.set = cache_set
self.setdefault = cache_set_default self.setdefault = cache_set_default
self.pop = cache_pop self.pop = cache_pop
self.del_multi = cache_del_multi if cache_type is TreeCache:
self.del_multi = cache_del_multi
self.len = cache_len self.len = cache_len
self.contains = cache_contains self.contains = cache_contains
self.clear = cache_clear self.clear = cache_clear
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment