View Source Plausible.Cache.Warmer (Plausible v0.0.1)
A periodic cache warmer.
Child specification options available:
cache_impl- module expected to implementPlausible.Cachebehaviourinterval- the number of milliseconds for each warm-up cyclecache_name- defaults to cache_impl.name() but can be overridden for testingforce_start?- enforcess process startup for testing, even if it's barred byPlausible.Cache.enabled?. This is useful for avoiding issues with DB ownership and async tests.warmer_fn- by convention, either:refresh_allor:refresh_updated_recently, both are automatically provided bycache_implmodule. Technically any exported or captured function will work, if need be.
See tests for more comprehensive examples.
Summary
Functions
@spec child_spec(Keyword.t()) :: Supervisor.child_spec() | :ignore