setInfo() function
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 is on.
Signature:
export declare function setInfo(logger: ILogger, res: any, key: string, decorator: Function): any;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
logger |
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
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.