# `PgRest.Cache`
[🔗](https://github.com/agoodway/pgrest/blob/v0.2.0/lib/pg_rest/cache.ex#L1)

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.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
