interface CachePluginOptions
Since 0.1.0

Options for the CachePlugin factory.

Examples

Example 1

import { CachePlugin } from '@setu-ts/cache-plugin';

// Memory store (default)
app.register(CachePlugin());

// Redis store with URL
app.register(CachePlugin({ store: 'redis', options: { url: 'redis://localhost:6379' } }));

Properties

Store backend type. Defaults to 'memory'.

optional
name: string

Plugin instance name for multi-cache setups. Derives the capability token as cache.<name> when not 'default'.

Store-specific options.

Usage

import { type CachePluginOptions } from "cache-plugin/src/index.ts";