This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Make DictionaryCache have better expiry properties #13292
Merged
Merged
Changes from 16 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
326a175
Make DictionaryCache have better expiry properties
erikjohnston 40a8fba
Newsfile
erikjohnston a22716c
Fix literal
erikjohnston f046366
Fix test
erikjohnston 602a81f
don't update access
erikjohnston 23c2f39
Fix mypy
erikjohnston cad555f
Better stuff
erikjohnston 7aceec3
Fix up
erikjohnston 057ae8b
Comments
erikjohnston 7f7b36d
Comment LruCache
erikjohnston 462db2a
Comment LruCache
erikjohnston 129691f
Comment TreeCache
erikjohnston 45d0dce
Merge branch 'develop' into erikj/dict_cache
erikjohnston ca8e1af
Update synapse/util/caches/dictionary_cache.py
erikjohnston e4723df
Update synapse/util/caches/lrucache.py
erikjohnston a74baa6
Split out code to separate method
erikjohnston a9ebcd2
Mark DictionaryEntry as frozen
erikjohnston 6a76dba
Don't reuse vars
erikjohnston d4133b2
Add example
erikjohnston 88aa56c
Make `LruCacheget_multi` return something sane.
erikjohnston f053edb
Woo comments
erikjohnston 740fe2f
Remove use of `cache_key`
erikjohnston 378aec5
More comments
erikjohnston 5709037
Support values being removed from dict
erikjohnston b376618
Fixup lint
erikjohnston 12e14f2
Make `missing` a list
erikjohnston fed7755
Don't iterate twice over `dict_key`
erikjohnston c9f13f3
Clarify comment
erikjohnston 67bb06d
Use iterable rather than generator
erikjohnston 2ec4cab
Add example
erikjohnston 50bb901
Add doc to TreeCache.get
erikjohnston aa203c6
Note that if full is True known_absent must be empty
erikjohnston 2151474
When fetching full dict don't return partial
erikjohnston 43e0030
Fix test, set takes an iterable
erikjohnston 3c23161
Add simple test for invalidation
erikjohnston e5ef14d
Fix test now we don't return partial dicts
erikjohnston 10fb0d0
Woo comments
erikjohnston d521be2
Comment if dict_keys is None
erikjohnston 3c84a98
Document update doesn't invalidate
erikjohnston 9c54881
Update synapse/util/caches/dictionary_cache.py
erikjohnston daa2741
Flesh out return value
erikjohnston 055a5dd
Lint
erikjohnston File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't document what happens if
dict_keys
is None, but we don't have the full dict cached. Could it, please?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... please?
I think it returns some fixed shape of DictionaryEntry ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I'd put some docs under the
dict_keys
arg (and there is some inDictionaryEntry
), but have also added some in the return value too.