whitfin / cachex

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

Allow warmers to be have named processes #341

Closed whitfin closed 5 months ago

whitfin commented 5 months ago

This fixes #334.

This MR updates the warmer struct to support a name value, which can either be left nil and populated with the warmer pid, or an atom. As the incubator and informant services now look similar, I pulled the common logic for linking into the parent Cachex.Services. Due to warmers being either named or not, you can now use only to filter by module/name when warming the cache.