Setu-TS
    Preparing search index...

    Function CachePlugin

    CachePlugin factory — registers an ICacheStore under CAPABILITIES.CACHE.

    • Creates the CachePlugin.

      Registers an ICacheStore under CAPABILITIES.CACHE (or cache.<name> when a custom name is provided for multi-cache setups).

      Parameters

      Returns IPlugin

      The plugin instance

      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', prefix: 'myapp:' },
      }));

      // Named cache instance
      app.register(CachePlugin({ name: 'session', options: { maxSize: 500 } }));

      0.1.0