code: function(max) {
        var keys = [],
          cache = {};
        return {
          set: function(key, value) {
            if (keys.length > this.length) {
              delete cache[keys.shift()];
            }
            cache[key] = value;
            keys.push(key);
            return value;
          },
          get: function(key) {
            if (key === undefined) return cache;
            return cache[key];
          },
          length: max,
          len: function() {
            return keys.length;
          }
        };
      }
docs: 存放local属性...被global坑死了 常用属性local化