This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@boredland/node-ts-cache-storage-memory
TypeScript icon, indicating that this package has built-in type declarations

7.0.2 • Public • Published

node-ts-cache-storage-memory

In-Memory storage module for node-ts-cache.

yarn add @boredland/node-ts-cache
yarn add @boredland/node-ts-cache-storage-memory
import { Cache, CacheContainer } from "@boredland/node-ts-cache"
import { MemoryStorage } from "@boredland/node-ts-cache-storage-memory"

const userCache = new CacheContainer(new MemoryStorage())

class MyService {
    @Cache(userCache, { ttl: 60 })
    public async getUsers(): Promise<string[]> {
        return ["Max", "User"]
    }
}

Package Sidebar

Install

npm i @boredland/node-ts-cache-storage-memory

Weekly Downloads

1

Version

7.0.2

License

MIT

Unpacked Size

4.29 kB

Total Files

10

Last publish

Collaborators

  • jonasstr