WithCacheOptions
Defined in: unstorage-utils.ts:25
Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
TArgs extends unknown[] |
Properties
Section titled “Properties”| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
prefix? |
string |
Key prefix. Uses unstorage’s prefixStorage for proper scoping. |
CacheOptions.prefix |
unstorage-utils.ts:16 |
storage |
Storage |
unstorage instance — use any driver (memory, redis, fs, db, etc.). | CacheOptions.storage |
unstorage-utils.ts:14 |
toKey? |
(…args) => string |
Convert the args to a cache key string. Defaults to hash(args) via ohash. |
- | unstorage-utils.ts:30 |
ttl? |
number |
TTL in seconds. Passed to the driver via TransactionOptions (native TTL for redis, etc.) AND stored as expiresAt in the entry (fallback for drivers without native TTL). |
CacheOptions.ttl |
unstorage-utils.ts:22 |