summary refs log tree commit diff
path: root/synapse/util/caches/descriptors.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused instance variableErik Johnston2017-03-311-4/+0
|
* Doc new instance variablesErik Johnston2017-03-301-1/+8
|
* Manually calculate cache key as getcallargs is expensiveErik Johnston2017-03-301-6/+28
| | | | | This is because getcallargs recomputes the getargspec, amongst other things, which we don't need to do as its already been done
* Don't convert to deferreds when not necessaryErik Johnston2017-03-301-1/+4
|
* Fix the logcontext handling in the cache wrappers (#2077)Richard van der Hoff2017-03-301-16/+14
| | | | | | | The cache wrappers had a habit of leaking the logcontext into the reactor while the lookup function was running, and then not restoring it correctly when the lookup function had completed. It's all the fault of `preserve_context_over_{fn,deferred}` which are basically a bit broken.
* Fix caching of remote servers' signature keysRichard van der Hoff2017-03-221-63/+72
| | | | | | | | | The `@cached` decorator on `KeyStore._get_server_verify_key` was missing its `num_args` parameter, which meant that it was returning the wrong key for any server which had more than one recorded key. By way of a fix, change the default for `num_args` to be *all* arguments. To implement that, factor out a common base class for `CacheDescriptor` and `CacheListDescriptor`.
* CommentErik Johnston2017-02-021-1/+4
|
* CommentErik Johnston2017-02-021-0/+2
|
* Fix typo in return typeErik Johnston2017-01-171-3/+2
|
* Rename and comment tree_to_leaves_iteratorErik Johnston2017-01-171-2/+2
|
* Speed up cache size calculationErik Johnston2017-01-171-23/+74
| | | | | | | | | | | Instead of calculating the size of the cache repeatedly, which can take a long time now that it can use a callback, instead cache the size and update that on insertion and deletion. This requires changing the cache descriptors to have two caches, one for pending deferreds and the other for the actual values. There's no reason to evict from the pending deferreds as they won't take up any more memory.
* Optionally measure size of cache by sum of length of valuesErik Johnston2017-01-131-5/+20
|
* Ensure invalidation list does not grow unboundedlyErik Johnston2016-08-191-12/+8
|
* Rename to on_invalidateErik Johnston2016-08-191-16/+10
|
* Make cache_context an explicit optionErik Johnston2016-08-191-8/+27
|
* Remove lru optionErik Johnston2016-08-191-23/+8
|
* Add concept of cache contextsErik Johnston2016-08-191-13/+64
|
* Merge branch 'erikj/cache_perf' of github.com:matrix-org/synapse into developErik Johnston2016-06-031-10/+25
|\
| * Pull out update_results_dictErik Johnston2016-06-031-8/+7
| |
| * Small optimisation to CacheListDescriptorErik Johnston2016-06-031-2/+2
| |
| * Make cachedList go a bit fasterErik Johnston2016-06-031-10/+34
| |
* | Change CacheMetrics to be quickerErik Johnston2016-06-031-4/+13
|/ | | | | | We change it so that each cache has an individual CacheMetric, instead of having one global CacheMetric. This means that when a cache tries to increment a counter it does not need to go through so many indirections.
* Make the cache objects be per instance rather than being globalMark Haines2016-04-061-21/+24
|
* Move cache size fiddling to descriptors only. Fix testsErik Johnston2016-03-011-2/+2
|
* Add enviroment variable SYNAPSE_CACHE_FACTOR, default it to 0.1Erik Johnston2016-03-011-0/+6
|
* Fix up logcontextsErik Johnston2016-02-081-5/+11
|
* Fix flake8 warnings for new flake8Daniel Wagner-Hall2016-02-021-2/+2
|
* Make LRU cache not default to treecache & add options to use itDavid Baker2016-01-221-6/+14
|
* Add invalidate_many here tooDavid Baker2016-01-221-0/+1
|
* Change LRUCache to be tree-based so we can delete subtrees.David Baker2016-01-211-1/+10
|
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Don't assume @cachedList function returns keys for everythingErik Johnston2015-08-181-1/+1
|
* DocstringErik Johnston2015-08-121-0/+27
|
* Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2015-08-121-1/+3
| | | | erikj/dictionary_cache
* Wire up the dictionarycache to the metricsErik Johnston2015-08-121-14/+3
|
* Move all the caches into their own package, synapse.util.cachesErik Johnston2015-08-111-0/+359