Commit Graph

20 Commits

Author SHA1 Message Date
Robert Schulze
e03618357e
Cleanup: Acquire lock in CacheBase::maxSize()
The upcoming TTLPolicy will likely have a runtime-configurable cache
size.
2023-03-14 08:38:22 +00:00
Robert Schulze
1d8004756a
Cleanup: Reuse aliases instead of redeclaring it 2023-03-13 15:11:12 +00:00
Robert Schulze
475415e421
Cleanup: Move on_weight_loss_function into concrete cache policies
Makes ICachePolicy a pure abstract interface
2023-03-13 09:20:07 +00:00
Robert Schulze
d165a15c58
Cleanup: Simplify some typedefs 2023-03-13 09:20:02 +00:00
Robert Schulze
9f6cb98c61
Cleanup: Remove default parameters from (S)LRUCachePolicy
Allows to add new mandatory parameters without accidentally breaking
something.
2023-03-13 09:19:55 +00:00
Robert Schulze
39898fbe64
Cleanup: max_elements_size --> max_entries
To disambiguate the maximum number of entries from the maximum byte size
of an entry.
2023-03-13 09:19:51 +00:00
Robert Schulze
7d5bc0d8c9
Cleanup: TrivialWeightFunction --> EqualWeightFunction
A true "trival" weight function would return .size() of the cache entry.
2023-03-13 09:19:45 +00:00
Robert Schulze
c300f5e68f
Cleanup: max_size --> max_size_in_bytes
To disambiguate the threshold from the maximum number of cache entries.
2023-03-13 09:19:39 +00:00
Alexey Milovidov
fa62c7e982 Fix half of trash 2022-09-10 04:08:16 +02:00
Antonio Andelic
e64436fef3 Fix typos with new codespell 2022-09-02 08:54:48 +00:00
alexX512
c9c26d4898 Fix review 2022-08-08 21:34:24 +00:00
alexX512
269631cfbe Fix typo 2022-08-07 20:02:32 +00:00
alexX512
62f84b88eb Review fixes 2022-08-07 20:02:21 +00:00
alexX512
a057e1607a Fix remove operation, add evict ion i from cachef number of elements greater than max_elements_size 2022-08-07 19:59:39 +00:00
alexX512
a238e349cd Unblocking get max_size 2022-08-07 19:59:39 +00:00
alexX512
50a8887ab9 Add [[maybe_unused]] locks and delete all objects from cache queue 2022-08-07 19:59:38 +00:00
alexX512
910645a52a Include fix in SLRUCachePolicy.h 2022-08-07 19:59:38 +00:00
alexX512
6bf29cb610 Change class LRUCache to class CachBase. Check running CacheBase with default pcahce policy SLRU 2022-08-07 19:59:30 +00:00
alexX512
c606ccc75d Fix formatting problems 2022-08-07 19:16:40 +00:00
alexX512
1133e42367 Add CacheBase clas instead of LRUCache and SLRUCache fo simpler configuration oache policiesf 2022-08-07 19:16:40 +00:00