mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-10 09:32:59 +01:00
if post content is empty post cache should still consider its size to be at least one. fixes #10831
13 lines
287 B
JavaScript
13 lines
287 B
JavaScript
'use strict';
|
|
|
|
const cacheCreate = require('../cache/lru');
|
|
const meta = require('../meta');
|
|
|
|
module.exports = cacheCreate({
|
|
name: 'post',
|
|
maxSize: meta.config.postCacheSize,
|
|
sizeCalculation: function (n) { return n.length || 1; },
|
|
ttl: 0,
|
|
enabled: global.env === 'production',
|
|
});
|