21 lines
318 B
JavaScript
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,
|
|
}
|