View Source Cachex.Limit.Accessed (Cachex v4.0.2)
Access based touch tracking for LRW pruning.
This module can be used to adapt Cachex.prune/3
for LRU purposes instead of
the typical LRW. This hook will update the modification time of a cache entry
upon access by a read operation. This is a very basic way to provide LRU policies,
but it should suffice for most cases.
At the time of writing modification times are not updated when executing
commands on multiple keys, such as Cachex.keys/2
and Cachex.stream/3
, for
performance reasons. Again, this may change in future if necessary.
Summary
Functions
Returns the actions this hook should listen on.
Returns the provisions this hook requires.