json-simple-cache
1.0.12 • Public • Published json-simple-cache
Example sending a web request if not be cached
const SimpleCache = require('json-simple-cache')
const cacheManager = new SimpleCache({
path: './caching/myfile',
expiration: 20000
})
const yourObjectIdentifier = "http://www.example.com/address?lat=2456.2151&lng=12125.1251"
var myResultCachedOrNot = cacheManager.doCachedRequest( yourObjectIdentifier, () => {
return myAwesomeWebRequest()
})
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 1.0.12
1
Version History
Package Sidebar
Install
Weekly Downloads