# CacheDecoratorOptions interface · @imqueue/rpc

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

Per-method options for the [cache](https://imqueue.org/api/rpc/latest/rpc.cache/) decorator.

**Signature:**

```typescript
export interface CacheDecoratorOptions 
```

## Properties


| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [adapter?](https://imqueue.org/api/rpc/latest/rpc.cachedecoratoroptions.adapter/) |  | string \| [ICache](https://imqueue.org/api/rpc/latest/rpc.icache/) \| [ICacheConstructor](https://imqueue.org/api/rpc/latest/rpc.icacheconstructor/) | _(Optional)_ Cache adapter as a constructor, an instance, or a built-in adapter name. |
| [nx?](https://imqueue.org/api/rpc/latest/rpc.cachedecoratoroptions.nx/) |  | boolean | _(Optional)_ Store only when the key does not already exist. |
| [ttl?](https://imqueue.org/api/rpc/latest/rpc.cachedecoratoroptions.ttl/) |  | number | _(Optional)_ Time-to-live in milliseconds. |

