View Source Plausible.Shield.PageRuleCache (Plausible v0.0.1)

Allows retrieving Page Rules by domain

Summary

Functions

@spec child_spec(Keyword.t()) :: Supervisor.child_spec()
@spec get(any(), Keyword.t()) :: any() | nil
Link to this function

get_or_store(key, fallback_fn, opts \\ [])

View Source
@spec get_or_store(any(), (-> any()), Keyword.t()) :: any() | nil
Link to this function

hit_rate(cache_name \\ name())

View Source

See Plausible.Cache.Stats.hit_rate/1.

Link to this function

merge_items(new_items, opts \\ [])

View Source
@spec merge_items(new_items :: [any()], opts :: Keyword.t()) :: :ok
Link to this function

ready?(cache_name \\ name())

View Source
@spec ready?(atom()) :: boolean()

Ensures the cache has non-zero size unless no items exist. Useful for orchestrating app startup to prevent the service going up asynchronously with an empty cache.

@spec refresh_all(Keyword.t()) :: :ok
Link to this function

refresh_updated_recently(opts \\ [])

View Source
@spec refresh_updated_recently(Keyword.t()) :: :ok
Link to this function

size(cache_name \\ name())

View Source

See Plausible.Cache.Adapter.size/1.

Link to this function

telemetry_event_refresh(cache_name \\ name(), mode)

View Source
@spec telemetry_event_refresh(atom(), atom()) :: [atom()]