Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add support for evicting cache entries based on last access time. #10205

Merged
merged 26 commits into from
Jul 5, 2021
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
700af7a
Add global cache list.
erikjohnston May 27, 2021
eaaee81
Add function to clean up old cache entries
erikjohnston Jun 18, 2021
811aa3f
Add config
erikjohnston Jun 18, 2021
9f62fdf
Newsfile
erikjohnston Jun 18, 2021
7ba719c
Update memory usage
erikjohnston Jun 18, 2021
01afcf6
Only use GLOBAL_LIST if time based eviction is enabled
erikjohnston Jun 18, 2021
a4657df
Add test
erikjohnston Jun 21, 2021
f72ed26
Reduce size overhead of new functionality
erikjohnston Jun 21, 2021
a52eb83
Merge remote-tracking branch 'origin/develop' into erikj/global_cache…
erikjohnston Jun 21, 2021
b314dfc
Fix 'caches' identation
erikjohnston Jun 24, 2021
6600a7c
Remove superflouous default None
erikjohnston Jun 24, 2021
e03a81c
Remove redundant setting of global_list_node
erikjohnston Jun 24, 2021
939ce8d
Make new attributes private
erikjohnston Jun 24, 2021
ecab588
Fixup comments
erikjohnston Jun 24, 2021
4181e1d
Improve comments and error handling when walking the graphs
erikjohnston Jun 24, 2021
7d865a1
Fix up names and comments in _expire_old_entries
erikjohnston Jun 24, 2021
be2667d
Add explicit `create_root_node`
erikjohnston Jun 24, 2021
1da43cb
Refactor so _ListNode doesn't take Clock
erikjohnston Jun 24, 2021
73064e0
Update comment about shared weakref
erikjohnston Jun 24, 2021
dd6dfdd
Remove superfluous _CacheEntry protocol
erikjohnston Jun 24, 2021
df40007
Add lock to ensure list mutation is thread safe
erikjohnston Jun 25, 2021
a2f5c11
Merge remote-tracking branch 'origin/develop' into erikj/global_cache…
erikjohnston Jul 5, 2021
df298d1
Fix indent
erikjohnston Jul 5, 2021
c5f19d9
Review comments
erikjohnston Jul 5, 2021
408e7c3
Move _ListNode to its own file
erikjohnston Jul 5, 2021
2f3480e
Apply suggestions from code review
erikjohnston Jul 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion synapse/config/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def read_config(self, config, **kwargs):
e.message # noqa: B306, DependencyException.message is a property
)

expiry_time = cache_config.get("expiry_time", None)
expiry_time = cache_config.get("expiry_time")
if expiry_time:
self.expiry_time_msec = self.parse_duration(expiry_time)
else:
Expand Down
Loading