mirror of
https://github.com/element-hq/synapse
synced 2024-09-03 23:40:07 +00:00
Docs
This commit is contained in:
parent
b811c98574
commit
63b1eaf32c
1 changed files with 3 additions and 0 deletions
|
@ -132,6 +132,9 @@ class Cache(object):
|
||||||
class CacheDescriptor(object):
|
class CacheDescriptor(object):
|
||||||
""" A method decorator that applies a memoizing cache around the function.
|
""" 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
|
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;
|
a tuple as the key for the cache. Hits are served directly from the cache;
|
||||||
misses use the function body to generate the value.
|
misses use the function body to generate the value.
|
||||||
|
|
Loading…
Reference in a new issue