Files
NodeBB/src/posts/cache.js
Barış Soner Uşaklı f1f9b225b0 feat: #8824, cache refactor (#8851)
* feat: #8824, cache refactor

ability to disable caches
ability to download contents of cache
refactor cache modules to remove duplicated code

* fix: remove duplicate hit/miss tracking

check cacheEnabled in getUncachedKeys
2020-11-06 23:13:12 -05:00

13 lines
274 B
JavaScript

'use strict';
const cacheCreate = require('../cacheCreate');
const meta = require('../meta');
module.exports = cacheCreate({
name: 'post',
max: meta.config.postCacheSize,
length: function (n) { return n.length; },
maxAge: 0,
enabled: global.env === 'production',
});