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

Add Cachex.warm/2 to allow manual cache warming #330

Closed whitfin closed 7 months ago

whitfin commented 7 months ago

This fixes #299.

This PR will add a new Cachex.warm/2 which performs a lookup on Cachex.Incubator to locate all child warmers and notify them to warm immediately. You can optionally provide the :modules option to restrict to a specific set of cache warmers. The list of modules which actually had warming triggered is returned.