Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add config flags to allow for cache auto-tuning (#12701) | Shay | 2022-05-13 | 1 | -1/+57 |
| | |||||
* | Replace assertEquals and friends with non-deprecated versions. (#12092) | Patrick Cloke | 2022-02-28 | 1 | -70/+70 |
| | |||||
* | Fix `LruCache` corruption bug with a `size_callback` that can return 0 (#11454) | Sean Quah | 2021-11-30 | 1 | -0/+12 |
| | | | | | | | | | | | When all entries in an `LruCache` have a size of 0 according to the provided `size_callback`, and `drop_from_cache` is called on a cache node, the node would be unlinked from the LRU linked list but remain in the cache dictionary. An assertion would be later be tripped due to the inconsistency. Avoid unintentionally calling `__len__` and use a strict `is None` check instead when unwrapping the weak reference. | ||||
* | Add support for evicting cache entries based on last access time. (#10205) | Erik Johnston | 2021-07-05 | 1 | -1/+45 |
| | |||||
* | Remove `keylen` from `LruCache`. (#9993) | Richard van der Hoff | 2021-05-24 | 1 | -2/+2 |
| | | | | | | | `keylen` seems to be a thing that is frequently incorrectly set, and we don't really need it. The only time it was used was to figure out if we had removed a subtree in `del_multi`, which we can do better by changing `TreeCache.pop` to return a different type (`TreeCacheNode`). Commits should be independently reviewable. | ||||
* | Remove redundant "coding: utf-8" lines (#9786) | Jonathan de Jong | 2021-04-14 | 1 | -1/+0 |
| | | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>` | ||||
* | Use mock from the stdlib. (#9772) | Patrick Cloke | 2021-04-09 | 1 | -1/+1 |
| | |||||
* | Fix 'LruCache' object has no attribute '_on_resize' (#8591) | Richard van der Hoff | 2020-10-19 | 1 | -1/+7 |
| | | | We need to make sure we are readu for the `set_cache_factor` callback. | ||||
* | Make LruCache register its own metrics (#8561) | Richard van der Hoff | 2020-10-16 | 1 | -2/+2 |
| | | | | | rather than have everything that instantiates an LruCache manage metrics separately, have LruCache do it itself. | ||||
* | Allow configuration of Synapse's cache without using synctl or environment ↵ | Amber Brown | 2020-05-11 | 1 | -3/+3 |
| | | | | variables (#6391) | ||||
* | Run black. | black | 2018-08-10 | 1 | -2/+0 |
| | |||||
* | run isort | Amber Brown | 2018-07-09 | 1 | -2/+2 |
| | |||||
* | Tidy up test | Erik Johnston | 2017-01-17 | 1 | -12/+12 |
| | |||||
* | Speed up cache size calculation | Erik Johnston | 2017-01-17 | 1 | -15/+15 |
| | | | | | | | | | | | 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 values | Erik Johnston | 2017-01-13 | 1 | -0/+25 |
| | |||||
* | Ensure invalidation list does not grow unboundedly | Erik Johnston | 2016-08-19 | 1 | -0/+40 |
| | |||||
* | Add concept of cache contexts | Erik Johnston | 2016-08-19 | 1 | -0/+113 |
| | |||||
* | Add tests | Erik Johnston | 2016-01-29 | 1 | -0/+7 |
| | |||||
* | Revert all the bits changing keys of eeverything that used LRUCaches to tuples | David Baker | 2016-01-22 | 1 | -22/+22 |
| | |||||
* | Make LRU cache not default to treecache & add options to use it | David Baker | 2016-01-22 | 1 | -1/+2 |
| | |||||
* | Test treecache directly | David Baker | 2016-01-22 | 1 | -0/+19 |
| | |||||
* | Change LRUCache to be tree-based so we can delete subtrees. | David Baker | 2016-01-21 | 1 | -22/+22 |
| | |||||
* | copyrights | Matthew Hodgson | 2016-01-07 | 1 | -1/+1 |
| | |||||
* | Move all the caches into their own package, synapse.util.caches | Erik Johnston | 2015-08-11 | 1 | -3/+1 |
| | |||||
* | Add a lru cache class | Mark Haines | 2015-02-11 | 1 | -0/+56 |