# registerChannelsOnce() function · @imqueue/pg-cache

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

Registers pg-cache channel entries for a method on the given prototype exactly once, even when called from a per-construction initializer.

**Signature:**

```typescript
export declare function registerChannelsOnce(proto: any, methodName: string, register: (channels: Record<string, unknown[]>) => void): void;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| proto | any | declaring prototype to attach channel metadata to |
| methodName | string | decorated method name (dedup key) |
| register | (channels: Record<string, unknown\[\]>) => void | pushes entries |


**Returns:**

void

