PhoenixKit.Modules.Publishing.ListingCache.LockTableOwner (PhoenixKitPublishing v0.2.0)

Copy Markdown View Source

Long-lived owner for the ListingCache regeneration-lock ETS table.

The lock table is :public/:named_table, but ETS tables are owned by the process that creates them. Without a supervised owner it was born in whichever transient request process first missed the cache and died with that process — after which the lock operations raised ArgumentError on the vanished table and 500'd a public read (M8). Creating it from this supervised GenServer keeps it alive for the life of the node; on the rare crash/restart the supervisor brings the owner (and table) back, and ListingCache.ensure_lock_table_exists/0 covers the brief gap.

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)