summary refs log tree commit diff
path: root/synapse/util/caches/__init__.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Correctly mention previous copyright (#16820)Erik Johnston2024-01-231-0/+2
| | | | | During the migration the automated script to update the copyright headers accidentally got rid of some of the existing copyright lines. Reinstate them.
* Update license headersPatrick Cloke2023-11-211-11/+16
|
* Bump black from 22.12.0 to 23.1.0 (#15103)dependabot[bot]2023-02-221-1/+0
|
* Remove redundant types from comments. (#14412)Patrick Cloke2022-11-161-1/+1
| | | | | | | Remove type hints from comments which have been added as Python type hints. This helps avoid drift between comments and reality, as well as removing redundant information. Also adds some missing type hints which were simple to fill in.
* Fix a memory leak when running the unit tests. (#13798)reivilibre2022-09-141-1/+2
|
* Fix cache metrics not being updated when not using the legacy exposition ↵reivilibre2022-09-081-12/+48
| | | | module. (#13717)
* Update Grafana dashboard to not use legacy metric names. (#13714)reivilibre2022-09-061-2/+2
|
* Add experimental configuration option to allow disabling legacy Prometheus ↵reivilibre2022-08-241-8/+8
| | | | | metric names. (#13540) Co-authored-by: David Robertson <davidr@element.io>
* Add more type hints to the main state store. (#12267)Patrick Cloke2022-03-311-2/+4
|
* Track cache invalidations (#12000)Erik Johnston2022-02-151-0/+1
| | | Currently we only track evictions due to size or time constraints.
* Add most missing type hints to synapse.util (#11328)Patrick Cloke2021-11-161-15/+17
|
* Track why we're evicting from caches (#10829)David Robertson2021-09-221-8/+23
| | | So we can see distinguish between "evicting because the cache is too big" and "evicting because the cache entries haven't been recently used".
* Add types to synapse.util. (#10601)reivilibre2021-09-101-7/+7
|
* Use inline type hints in `http/federation/`, `storage/` and `util/` (#10381)Jonathan de Jong2021-07-151-2/+2
|
* Optionally track memory usage of each LruCache (#9881)Erik Johnston2021-05-051-0/+31
| | | | | This will double count slightly in the presence of interned strings. It's off by default as it can consume a lot of resources.
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-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>`
* Make it possible to use dmypy (#9692)Erik Johnston2021-03-261-2/+2
| | | | | | | | | Running `dmypy run` will do a `mypy` check while spinning up a daemon that makes rerunning `dmypy run` a lot faster. `dmypy` doesn't support `follow_imports = silent` and has `local_partial_types` enabled, so this PR enables those options and fixes the issues that were newly raised. Note that `local_partial_types` will be enabled by default in upcoming mypy releases.
* Enable addtional flake8-bugbear linting checks. (#9659)Jonathan de Jong2021-03-241-1/+1
|
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-4/+2
| | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
* Make LruCache register its own metrics (#8561)Richard van der Hoff2020-10-161-5/+8
| | | | | rather than have everything that instantiates an LruCache manage metrics separately, have LruCache do it itself.
* Use slots in attrs classes where possible (#8296)Patrick Cloke2020-09-141-1/+1
| | | | | slots use less memory (and attribute access is faster) while slightly limiting the flexibility of the class attributes. This focuses on objects which are instantiated "often" and for short periods of time.
* Stop sub-classing object (#8249)Patrick Cloke2020-09-041-1/+1
|
* remove miscellaneous PY2 codeRichard van der Hoff2020-05-151-6/+1
|
* Allow configuration of Synapse's cache without using synctl or environment ↵Amber Brown2020-05-111-69/+75
| | | | variables (#6391)
* Remove usage of deprecated logger.warn method from codebase (#6271)Andrew Morgan2019-10-311-1/+1
| | | Replace every instance of `logger.warn` with `logger.warning` as the former is deprecated.
* Fix up some typechecking (#6150)Amber Brown2019-10-021-1/+2
| | | | | | * type checking fixes * changelog
* Add a prometheus metric for active cache lookups. (#5750)Richard van der Hoff2019-07-241-1/+16
| | | | | | * Add a prometheus metric for active cache lookups. * changelog
* Run Black. (#5482)Amber Brown2019-06-201-3/+3
|
* Log which cache is throwing exceptionsRichard van der Hoff2018-09-261-10/+17
|
* run isortAmber Brown2018-07-091-3/+3
|
* Add hacky cache factor override systemErik Johnston2018-06-041-0/+10
|
* add comment about why unregAmber Brown2018-05-281-0/+2
|
* Merge remote-tracking branch 'origin/develop' into 3218-official-promAmber Brown2018-05-281-1/+6
|\
| * fix py3 intern and remove unnecessary py3 encodeAdrian Tschira2018-05-191-1/+6
| | | | | | | | Signed-off-by: Adrian Tschira <nota@notafile.com>
* | cleanup pep8 errorsAmber Brown2018-05-221-2/+5
| |
* | fixesAmber Brown2018-05-221-11/+29
| |
* | replacing portionsAmber Brown2018-05-211-17/+40
|/
* Increase default cache factor size.Erik Johnston2017-07-041-1/+1
|
* Remove DEBUG_CACHESErik Johnston2017-04-251-2/+0
|
* Only intern ascii stringsErik Johnston2017-04-241-18/+11
|
* Measure metrics of string_cacheErik Johnston2017-01-171-3/+8
|
* Change CacheMetrics to be quickerErik Johnston2016-06-031-5/+15
| | | | | | 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.
* Simplify intern_dictErik Johnston2016-03-231-17/+10
|
* Intern all the thingsErik Johnston2016-03-231-1/+57
|
* String internErik Johnston2016-03-231-0/+8
|
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Wire up the dictionarycache to the metricsErik Johnston2015-08-121-0/+13
|
* Move all the caches into their own package, synapse.util.cachesErik Johnston2015-08-111-0/+14