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

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

Reports a successful cache write and passes the value straight through, so it can be used inline in a return position. Logs only when [PG\_CACHE\_DEBUG](https://imqueue.org/api/pg-cache/latest/pg-cache.pg_cache_debug/) is on.

**Signature:**

```typescript
export declare function setInfo(logger: ILogger, res: any, key: string, decorator: Function): any;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| logger | [ILogger](https://imqueue.org/api/pg-cache/latest/pg-cache.ilogger/) | logger to report through |
| res | any | value that was cached; returned unchanged |
| key | string | redis key it was stored under |
| decorator | Function | decorator that performed the write, named in the message |


**Returns:**

any

`res`, unchanged

