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

4.4.0 • Public • Published

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

npm i node-ts-cache
npm i node-ts-cache-storage-node-fs
import { Cache, CacheContainer } from "node-ts-cache"
import { NodeFsStorage } from "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 node-ts-cache-storage-node-fs

Weekly Downloads

283

Version

4.4.0

License

MIT

Unpacked Size

10.4 kB

Total Files

8

Last publish

Collaborators

  • havsar