whitfin / cachex

A powerful caching library for Elixir with support for transactions, fallbacks and expirations
https://hexdocs.pm/cachex/
MIT License
1.6k stars 103 forks source link

Warmers should have names defined, rather than simply the module name #334

Closed whitfin closed 7 months ago

whitfin commented 7 months ago

Perhaps a less common use case, but it's totally valid you might have the same warmer to pull from two different sources (e.g. two databases).

You can't do this right now because the warmers are named after their module. Having the name be optional in the same was as hooks makes this cleaner.

This does not technically have to be a breaking change, but I'm going to put it in 4.0 nonetheless.