tibi-docs/api/hooks/lib/utils.js
Sebastian Frank 86e0a17265
All checks were successful
deploy to production / deploy (push) Successful in 45s
yarn package upgrades, ssr update
2023-11-15 07:00:12 +00:00

21 lines
318 B
JavaScript

/**
*
* @param {any} str
*/
function log(str) {
console.log(JSON.stringify(str, undefined, 4))
}
/**
* clear SSR cache
*/
function clearSSRCache() {
var info = context.db.deleteMany("ssr", {})
context.response.header("X-SSR-Cleared", info.removed)
}
module.exports = {
log,
clearSSRCache,
}