Periodic LRW (Least Recently Written) evictor for caches with max_size.
Shadow ETS tables track write timestamps only for caches that have a configured
max_size. Caches without max_size incur zero overhead.
Every @interval ms, the evictor checks each evictable cache and removes
the oldest entries when the main table exceeds its limit.
Example
config :eda,
cache: [
users: [max_size: 100_000]
]
Summary
Functions
Returns a specification to start this module under a supervisor.
Removes a key from the shadow tables. Called by cache modules on delete.
No-op if the cache has no max_size configured.
Records a write in the shadow tables. Called by cache modules on create/upsert.
No-op if the cache has no max_size configured. Direct ETS ops, non-blocking.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Removes a key from the shadow tables. Called by cache modules on delete.
No-op if the cache has no max_size configured.
Records a write in the shadow tables. Called by cache modules on create/upsert.
No-op if the cache has no max_size configured. Direct ETS ops, non-blocking.