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

8.0.1 • Public • Published

node-ts-cache-storage-node-fs

Node.js file system storage module for node-ts-cache.

yarn add @ioki/node-ts-cache @ioki/node-ts-cache-storage-node-fs
import { Cache, CacheContainer } from "@ioki/node-ts-cache"
import { NodeFsStorage } from "@ioki/node-ts-cache-storage-node-fs"

const userCache = new CacheContainer(new NodeFsStorage())

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

Package Sidebar

Install

npm i @ioki/node-ts-cache-storage-node-fs

Weekly Downloads

0

Version

8.0.1

License

MIT

Unpacked Size

7.92 kB

Total Files

10

Last publish

Collaborators

  • ans82
  • jonasstr
  • chb-ioki