diff --git a/src/posts/cache.js b/src/posts/cache.js index 888fba6424..7f4711d0cd 100644 --- a/src/posts/cache.js +++ b/src/posts/cache.js @@ -6,7 +6,7 @@ const meta = require('../meta'); module.exports = cacheCreate({ name: 'post', maxSize: meta.config.postCacheSize, - sizeCalculation: function (n) { return n.length; }, + sizeCalculation: function (n) { return n.length || 1; }, ttl: 0, enabled: global.env === 'production', });