There's a lot in here, but the gist is that :stats and :limit have been completely removed in favour of simply providing the hooks directly. This is a much smaller implementation, and is easier to understand (because we're guiding everyone to hooks).
This also introduces a new cache action via Cachex.prune/3 which can be used to manually prune a cache to a size. This is used by the hooks under the hood.
Hook records have also had :state => :args to better show that they can have modified state, more inline with GenServer.
This fixes #368.
There's a lot in here, but the gist is that
:stats
and:limit
have been completely removed in favour of simply providing the hooks directly. This is a much smaller implementation, and is easier to understand (because we're guiding everyone to hooks).This also introduces a new cache action via
Cachex.prune/3
which can be used to manually prune a cache to a size. This is used by the hooks under the hood.Hook records have also had
:state
=>:args
to better show that they can have modified state, more inline withGenServer
.