@ -70,7 +70,7 @@
"less": "^2.7.3",
"lodash": "^4.17.10",
"logrotate-stream": "^0.2.5",
"lru-cache": "4.1.5",
"lru-cache": "5.1.1",
"material-design-lite": "^1.3.0",
"mime": "^2.2.0",
"mkdirp": "^0.5.1",
@ -26,7 +26,7 @@ var uniquevisitors = 0;
* the cache could be exhausted continuously if there are more than 500 concurrently
* active users
*/
var ipCache = LRU({
var ipCache = new LRU({
max: 500,
length: function () { return 1; },
maxAge: 0,
@ -3,7 +3,7 @@
var LRU = require('lru-cache');
var pubsub = require('./pubsub');
var cache = LRU({
var cache = new LRU({
max: 1000,
});
@ -4,7 +4,7 @@ module.exports.create = function (name) {
var pubsub = require('../pubsub');
max: 20000,
max: 40000,
@ -22,7 +22,7 @@ var controllers = {
helpers: require('../controllers/helpers'),
};
var delayCache = LRU({
var delayCache = new LRU({
maxAge: 1000 * 60,
var meta = require('../meta');
max: meta.config.postCacheSize,
length: function (n) { return n.length; },
@ -9,7 +9,7 @@ var pubsub = require('../pubsub');
module.exports = function (User) {
User.blocks = {
_cache: LRU({
_cache: new LRU({
max: 100,