feat: utilities - cache
This commit is contained in:
1 parent
13f172978f
commit
dc4fa9b31e
10 files changed
+126
-11
No files matched your search
@@ -417,6 +417,10 @@ module.exports = class Page extends Model {
|
||||
return fs.remove(path.join(process.cwd(), `data/cache/${page.hash}.bin`))
|
||||
}
|
||||
|
||||
static async flushCache() {
|
||||
return fs.emptyDir(path.join(process.cwd(), `data/cache`))
|
||||
}
|
||||
|
||||
static cleanHTML(rawHTML = '') {
|
||||
return striptags(rawHTML || '')
|
||||
.replace(emojiRegex(), '')
|
||||
|
||||
Reference in new issue
Block a user