mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-16 20:42:58 +01:00
10 lines
237 B
JavaScript
10 lines
237 B
JavaScript
var LRU = require('lru-cache');
|
|
var meta = require('../meta');
|
|
|
|
var cache = LRU({
|
|
max: parseInt(meta.config.postCacheSize, 10) || 1048576,
|
|
length: function (n) { return n.length; },
|
|
maxAge: 1000 * 60 * 60,
|
|
});
|
|
|
|
module.exports = cache; |