# PgCacheOptions.requireInvalidation property · @imqueue/pg-cache

Source: https://imqueue.org/api/pg-cache/latest/pg-cache.pgcacheoptions.requireinvalidation/
Published: 2026-08-31
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-cache 5.1.4 — generated reference, not hand-written

Pass true to refuse to cache at all when invalidation could not be established. Off by default.

**Signature:**

```typescript
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](https://imqueue.org/api/pg-cache/latest/pg-cache.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.

