PgCacheOptions.requireInvalidation property
Pass true to refuse to cache at all when invalidation could not be established. Off by default.
Signature:
requireInvalidation?: boolean;
Remarks
Regardless of this option, start() does not resolve until the triggers and channel subscriptions are confirmed, so a row changed right after start-up is always noticed. This option covers what happens when that setup *fails* — or when no channels were registered, so nothing could ever invalidate the entries.
By default such a service still caches, and its entries then expire by ttl alone; the ttl defaults to 24 hours (DEFAULT_CACHE_TTL), so that is how stale a value can get. Pass true where that is the wrong trade and the service should run uncached instead, paying latency to avoid serving something nothing will ever invalidate.
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.