CacheOptions<Item>
CacheOptions<
Item> =object
Configuration options for cache stores
Type Parameters
| Type Parameter |
|---|
|
|
Properties
| Property | Type | Default value | Description |
|---|---|---|---|
|
|
|
Unique name for the cache store. Used as a prefix for cache keys to avoid collisions. | |
|
( |
|
Function to parse stored strings back into source objects. If it throws an error, the cache will be treated as a miss and the value will be deleted. | |
|
( |
|
Function to serialize source objects into strings for cache storage. | |
|
|
|
Optional namespace to prefix all cache keys | |
|
( |
|
Hook that gets called with the refs of deleted items after a delete operation. | |
|
( |
|
Hook that gets called with the inserted items after an insert operation. | |
|
( |
|
Hook that gets called with the updated items after an update operation. | |
|
|
|
Revision number for cache invalidation. Incrementing this number will invalidate all existing cache entries for this store. | |
|
|
|
Time-to-live in milliseconds |