# PgCacheable interface · @imqueue/pg-cache

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

What the [PgCache()](https://imqueue.org/api/pg-cache/latest/pg-cache.pgcache/) decorator adds to the class it is applied to. A decorated service gains these three members, so code inside the service can reach the cache and the subscription directly.

**Signature:**

```typescript
export interface PgCacheable 
```

## Properties


| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [pgCacheChannels](https://imqueue.org/api/pg-cache/latest/pg-cache.pgcacheable.pgcachechannels/) |  | [PgCacheChannels](https://imqueue.org/api/pg-cache/latest/pg-cache.pgcachechannels/) | Table-to-method registry built by the [cacheWith()](https://imqueue.org/api/pg-cache/latest/pg-cache.cachewith/) and [cacheBy()](https://imqueue.org/api/pg-cache/latest/pg-cache.cacheby/) method decorators at class-definition time, and read when a notification arrives to decide what to invalidate. |
| [pubSub](https://imqueue.org/api/pg-cache/latest/pg-cache.pgcacheable.pubsub/) |  | PgPubSub | PostgreSQL LISTEN/NOTIFY subscription the triggers publish to. One channel per watched table. |
| [taggedCache](https://imqueue.org/api/pg-cache/latest/pg-cache.pgcacheable.taggedcache/) |  | TagCache | Tagged redis cache holding the memoised method results. Each entry is tagged with the tables it depends on, which is how a change notification invalidates exactly the right entries. |

