diff options
author | Erik Johnston <erik@matrix.org> | 2015-08-06 14:02:50 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-08-06 14:02:50 +0100 |
commit | 63b1eaf32c57f0e1bae9b6a3768a560165637aee (patch) | |
tree | a43f82bd82c1e110efd3d4a55d16e3fd000a25f4 /synapse/storage/_base.py | |
parent | Remove failed deferreds from cache (diff) | |
download | synapse-63b1eaf32c57f0e1bae9b6a3768a560165637aee.tar.xz |
Docs
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r-- | synapse/storage/_base.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index 99c0948754..0872a438f1 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -132,6 +132,9 @@ class Cache(object): class CacheDescriptor(object): """ A method decorator that applies a memoizing cache around the function. + This caches deferreds, rather than the results themselves. Deferreds that + fail are removed from the cache. + The function is presumed to take zero or more arguments, which are used in a tuple as the key for the cache. Hits are served directly from the cache; misses use the function body to generate the value. |