Repository URL to install this package:
|
Version:
1.1.13 ▾
|
/**
* @todo @fixme - may be some issue with this somehow :o
*/
export function nocache(req) {
if (isObj(req.query) && isTrue(req.query.nocache)) {
return true
} else {
return false
}
}
export function clearCache(req) {
/**
* @todo - this should clear the cache in api for the version
* used when updating from studio
*/
}
export function cacheResponse(res, body) {
const hash = fromRequestToHash(res, '/apiproxy/')
// require('fliplog').bold('caching ').data(hash).echo()
// require('fliplog').bold('==================').data({ body }).echo()
if (isErrorLikeResponse(body)) {
console.error('response was error, not caching', body)
return
}
// oneStorage.set(hash, body)
}