Deletes stored recordings beyond the configured age or count.
Runs every retention.interval milliseconds when :max_age or
:max_count is configured; otherwise the process stays idle. Recordings
still in the buffer are never pruned.
Summary
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec expired( [PhoenixReplay.Recording.Summary.t()], PhoenixReplay.Config.retention(), integer() ) :: [ PhoenixReplay.Recording.Summary.t() ]
Selects summaries older than max_age or beyond the newest max_count.
summaries must be ordered most recent first.
@spec prune(PhoenixReplay.Config.t(), integer()) :: [PhoenixReplay.Recording.id()]
Deletes every stored recording that expired/3 selects. Returns the deleted ids.
@spec start_link(keyword()) :: GenServer.on_start()
Starts the retention process registered under its module name.