🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@type-cacheable/lru-cache-adapter

Package Overview
Dependencies
Maintainers
0
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@type-cacheable/lru-cache-adapter

Adapter for using lru-cache with type-cacheable

18.0.0
latest
Source
npm
Version published
Maintainers
0
Created
Source

@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

Keywords

cache

FAQs

Package last updated on 21 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts