@baeta/extension-cache-keyv
Classes
KeyvStore
Keyv-based cache store implementation.
Remarks
Not recommended for production environments with high query volumes. Consider using Redis or Upstash for production deployments.
Example
import { KeyvStore } from "@baeta/extension-cache-keyv";
import Keyv from "keyv";
const keyv = new Keyv();
const store = new KeyvStore(keyv);
// Use with cache extension
const cacheExt = cacheExtension(store, {
ttl: 3600,
});
Extends
Store
Constructors
new KeyvStore()
new KeyvStore(
keyv
):KeyvStore
Parameters
Parameter | Type |
---|---|
|
|
Returns
Overrides
Store.constructor
Properties
Property | Modifier | Type |
---|---|---|
|
|
|
Methods
createStoreAdapter()
createStoreAdapter<
T
>(options
,type
,hash
):StoreAdapter
<T
>
Creates a new store adapter for a specific type
Type Parameters
Type Parameter |
---|
|
Parameters
Parameter | Type | Description |
---|---|---|
|
|
Store configuration options |
|
|
Type name for the cached items |
|
|
Unique hash for the type |
Returns
StoreAdapter
<T
>
Overrides
Store.createStoreAdapter