summary refs log tree commit diff
path: root/synapse/storage/_base.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-08-05 15:41:20 +0100
committerErik Johnston <erik@matrix.org>2015-08-05 15:41:20 +0100
commitb52b4a84ecae24c358ec5e337645c1f439021ab5 (patch)
tree643fa41d112af0bf927703fb122bc26d6279ebbc /synapse/storage/_base.py
parentUse dictionary cache to do group -> state fetching (diff)
parentUp the cache size for 'get_joined_hosts_for_room' and 'get_users_in_room' (diff)
downloadsynapse-b52b4a84ecae24c358ec5e337645c1f439021ab5.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/dictionary_cache
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r--synapse/storage/_base.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index 803b9d599d..30a9e3f0a3 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -58,7 +58,7 @@ cache_counter = metrics.register_cache(
 
 class Cache(object):
 
-    def __init__(self, name, max_entries=1000, keylen=1, lru=False):
+    def __init__(self, name, max_entries=1000, keylen=1, lru=True):
         if lru:
             self.cache = LruCache(max_size=max_entries)
             self.max_entries = None
@@ -158,7 +158,7 @@ class CacheDescriptor(object):
     which can be used to insert values into the cache specifically, without
     calling the calculation function.
     """
-    def __init__(self, orig, max_entries=1000, num_args=1, lru=False):
+    def __init__(self, orig, max_entries=1000, num_args=1, lru=True):
         self.orig = orig
 
         self.max_entries = max_entries
@@ -209,7 +209,7 @@ class CacheDescriptor(object):
         return wrapped
 
 
-def cached(max_entries=1000, num_args=1, lru=False):
+def cached(max_entries=1000, num_args=1, lru=True):
     return lambda orig: CacheDescriptor(
         orig,
         max_entries=max_entries,