summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-08-05 15:39:47 +0100
committerErik Johnston <erik@matrix.org>2015-08-05 15:39:47 +0100
commita89559d79714b8dd07ec5a73f2629d003fcad92c (patch)
treea383a5dc4e2c1aa3ce791fa655c20842249f58d4 /synapse
parentDon't try & check the username if we don't have one (which we won't if it's b... (diff)
downloadsynapse-a89559d79714b8dd07ec5a73f2629d003fcad92c.tar.xz
Use LRU cache by default
Diffstat (limited to 'synapse')
-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 8f812f0fd7..2a601e37e3 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -57,7 +57,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
@@ -141,7 +141,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
@@ -192,7 +192,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,