-
- Downloads
Allow for ignoring some arguments when caching. (#12189)
* `@cached` can now take an `uncached_args` which is an iterable of names to not use in the cache key. * Requires `@cached`, @cachedList` and `@lru_cache` to use keyword arguments for clarity. * Asserts that keyword-only arguments in cached functions are not accepted. (I tested this briefly and I don't believe this works properly.)
Showing
- changelog.d/12189.misc 1 addition, 0 deletionschangelog.d/12189.misc
- synapse/storage/databases/main/events_worker.py 2 additions, 2 deletionssynapse/storage/databases/main/events_worker.py
- synapse/util/caches/descriptors.py 58 additions, 16 deletionssynapse/util/caches/descriptors.py
- tests/util/caches/test_descriptors.py 81 additions, 3 deletionstests/util/caches/test_descriptors.py
Loading
Please register or sign in to comment