Lightning.Adaptors.Invalidator (Lightning v2.19.0)
View SourceSubscribes to cluster adaptor-change broadcasts and evicts matching local Cachex entries, keeping each node coherent with Postgres.
Subscribes to opts[:source_topic] on Lightning.PubSub at init. On
{:changed, name, source} it deletes every cache key
Lightning.Adaptors.Store writes for that name, plus the source-wide
:packages and :catalogue keys, which any change invalidates.
Dropping :icon_bytes is what lets a committed icon error clear. Only
the row moving can resolve it, and the row moving always broadcasts.
There is no source filtering. A broadcast for a source not active on
this node deletes keys that do not exist, which is a no-op.
Summary
Functions
Returns a specification to start this module under a supervisor.
Start the Invalidator linked to the calling process.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec start_link(keyword()) :: GenServer.on_start()
Start the Invalidator linked to the calling process.
Required opts:
:name- registered process name.:source_topic-Phoenix.PubSubtopic to subscribe to.:cache- Cachex table atom, fromLightning.Adaptors.Supervisor.cache_name/1.