摘要:
var Cache = function(max, buffer) { this.$cache = []; this.$max = max | 0 || 20; this.$buffer = buffer | 0 || 5;};Cache.prototype.set = function(key, cacheItem) { var cache = this.$cache; key = 'cache_' + key; var temp = cache[key]; if (!cache.hasOwnProperty(key)) { if (c... 阅读全文