summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-02-18 10:14:10 +0000
committerErik Johnston <erik@matrix.org>2015-02-18 10:14:10 +0000
commitec847059f3e9b9b5de62aa2f7ad2366c4e883fac (patch)
treea5c4465cba8245243dbcd8d8ead8a0097d7782d0 /synapse
parentFix typo in function name (diff)
downloadsynapse-ec847059f3e9b9b5de62aa2f7ad2366c4e883fac.tar.xz
Rename _fail_fetch_pdu_cache to _get_pdu_cache
Diffstat (limited to 'synapse')
-rwxr-xr-xsynapse/app/homeserver.py2
-rw-r--r--synapse/federation/federation_client.py16
2 files changed, 9 insertions, 9 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py
index 7565d94449..7be82d0576 100755
--- a/synapse/app/homeserver.py
+++ b/synapse/app/homeserver.py
@@ -275,7 +275,7 @@ def setup():
     hs.get_pusherpool().start()
     hs.get_state_handler().start_caching()
     hs.get_datastore().start_profiling()
-    hs.get_replication_layer().start_pdu_fail_cache()
+    hs.get_replication_layer().start_get_pdu_cache()
 
     if config.daemonize:
         print config.pid_file
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py
index 83b4947b99..6042e366bd 100644
--- a/synapse/federation/federation_client.py
+++ b/synapse/federation/federation_client.py
@@ -32,10 +32,10 @@ logger = logging.getLogger(__name__)
 
 class FederationClient(FederationBase):
     def __init__(self):
-        self._fail_fetch_pdu_cache = None
+        self._get_pdu_cache = None
 
-    def start_pdu_fail_cache(self):
-        self._fail_fetch_pdu_cache = ExpiringCache(
+    def start_get_pdu_cache(self):
+        self._get_pdu_cache = ExpiringCache(
             cache_name="get_pdu_cache",
             clock=self._clock,
             max_len=1000,
@@ -43,7 +43,7 @@ class FederationClient(FederationBase):
             reset_expiry_on_get=False,
         )
 
-        self._fail_fetch_pdu_cache.start()
+        self._get_pdu_cache.start()
 
     @log_function
     def send_pdu(self, pdu, destinations):
@@ -175,8 +175,8 @@ class FederationClient(FederationBase):
 
         # TODO: Rate limit the number of times we try and get the same event.
 
-        if self._fail_fetch_pdu_cache:
-            e = self._fail_fetch_pdu_cache.get(event_id)
+        if self._get_pdu_cache:
+            e = self._get_pdu_cache.get(event_id)
             if e:
                 defer.returnValue(e)
 
@@ -223,8 +223,8 @@ class FederationClient(FederationBase):
                 )
                 continue
 
-        if self._fail_fetch_pdu_cache is not None:
-            self._fail_fetch_pdu_cache[event_id] = pdu
+        if self._get_pdu_cache is not None:
+            self._get_pdu_cache[event_id] = pdu
 
         defer.returnValue(pdu)