Closed whitfin closed 1 month ago
The thinking here is simply documenting the LRW policy as a LRW cleanup hook (not sure of the naming yet). The LRU policy will simply be a hook which updates the modification time, and the documentation will state how you can use that alongside LRW to produce LRU.
This will also include various changes with hooks in general, such as removing :stats
in favour of explicit addition.
There is no real point of policies and limits in the current implementation of Cachex.
Each existing limit simply spawns hooks to handle the management of a cache, so we should remove the modules for policies and simply document adding of the hooks instead. This is quite a big change, but it should make a lot more sense on completion.