PgRest.Cache (PgRest v0.2.0)

Copy Markdown View Source

Owns the node-wide ETS caches every PgRest.Plug and PgRest.Registry share: the compiled scoped SQL (PgRest.SQL.ScopedSource) and the prepared-statement promotion table (PgRest.StatementCache).

The :pgrest application supervises it, independently of any registry, so starting, stopping or restarting registries never drops or duplicates the caches. Both tables are created idempotently. When the owner is not running (the application is not started, or the owner is restarting), readers fall back without error: scoped SQL compiles uncached and statements stay unnamed.

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.