@type-cacheable/lru-cache-adapter
TypeScript icon, indicating that this package has built-in type declarations

17.0.1 • Public • Published

@type-cacheable/lru-cache-adapter

npm downloads

TypeScript-based caching decorators to assist with caching (and clearing cache for) async methods. This package supports the lru-cache client.

View full documentation

Usage

Installation

npm install --save @type-cacheable/core @type-cacheable/lru-cache-adapter

or

yarn add @type-cacheable/core @type-cacheable/lru-cache-adapter

Using adapter

import { LRUCache } from 'lru-cache';
import { useAdapter } from '@type-cacheable/lru-cache-adapter';

const client = new LRUCache<string, any>();
const clientAdapter = useAdapter(client);

Then you can rely on the @Cacheable, @CacheUpdate, and @CacheClear decorators from @type-cacheable/core. See core documentation

/@type-cacheable/lru-cache-adapter/

    Package Sidebar

    Install

    npm i @type-cacheable/lru-cache-adapter

    Weekly Downloads

    1,042

    Version

    17.0.1

    License

    MIT

    Unpacked Size

    10.5 kB

    Total Files

    6

    Last publish

    Collaborators

    • joshuaslate