mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-08 08:32:53 +01:00
13 lines
240 B
JavaScript
13 lines
240 B
JavaScript
'use strict';
|
|
|
|
var LRU = require('lru-cache');
|
|
var meta = require('../meta');
|
|
|
|
var cache = LRU({
|
|
max: parseInt(meta.config.postCacheSize, 10) || 5242880,
|
|
length: function (n) { return n.length; },
|
|
maxAge: 0,
|
|
});
|
|
|
|
module.exports = cache;
|