2017-06-27 18:10:24 +08:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This module provides an object with the interface of an LRU cache
|
|
|
|
* but that actually does not store anything.
|
|
|
|
*
|
|
|
|
* See https://github.com/isaacs/node-lru-cache/tree/v2.5.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
function NoCache() {
|
2017-06-27 19:26:14 +08:00
|
|
|
}
|
2017-06-27 18:10:24 +08:00
|
|
|
|
|
|
|
module.exports = NoCache;
|
|
|
|
|
2017-06-27 19:26:14 +08:00
|
|
|
NoCache.prototype.set = function (/* key, value */) {
|
2017-06-27 18:10:24 +08:00
|
|
|
return true;
|
|
|
|
};
|
|
|
|
|
2017-06-27 19:26:14 +08:00
|
|
|
NoCache.prototype.get = function (/* key */) {
|
2017-06-27 18:10:24 +08:00
|
|
|
return undefined;
|
|
|
|
};
|
|
|
|
|
2017-06-27 19:26:14 +08:00
|
|
|
NoCache.prototype.peek = function (/* key */) {
|
2017-06-27 18:10:24 +08:00
|
|
|
return undefined;
|
|
|
|
};
|
|
|
|
|
2017-06-27 19:26:14 +08:00
|
|
|
NoCache.prototype.del = function (/* key */) {
|
2017-06-27 18:10:24 +08:00
|
|
|
return undefined;
|
|
|
|
};
|
|
|
|
|
|
|
|
NoCache.prototype.reset = function () {
|
|
|
|
return undefined;
|
|
|
|
};
|
|
|
|
|
2017-06-27 19:26:14 +08:00
|
|
|
NoCache.prototype.has = function (/* key */) {
|
2017-06-27 18:10:24 +08:00
|
|
|
return false;
|
|
|
|
};
|
|
|
|
|
2017-06-27 19:26:14 +08:00
|
|
|
NoCache.prototype.forEach = function (/* fn, thisp */) {
|
2017-06-27 18:10:24 +08:00
|
|
|
return undefined;
|
|
|
|
};
|
|
|
|
|
|
|
|
NoCache.prototype.keys = function () {
|
|
|
|
return [];
|
|
|
|
};
|
|
|
|
|
|
|
|
NoCache.prototype.values = function () {
|
|
|
|
return [];
|
|
|
|
};
|