1.1.0 • Published 28 days ago
cocoa-cache v1.1.0
cocoa-cache
Simple cache that calls the function when the provided stored key reaches the number of seconds provided
Usage
const cache = new TimedCache()
const ms = 5000
await this.cache.obtain('Key', ms, async (): Promise<string> => await this.request.send(key))