code: function cacher(f, scope, postprocessor) {
              function repush(array, item) {
                  for (var i = 0, ii = array.length; i < ii; i++) if (array[i] === item) {
                      return array.push(array.splice(i, 1)[0]);
                  }
              }
              function newf() {
                  var arg = Array.prototype.slice.call(arguments, 0), args = arg.join("␀"), cache = newf.cache = newf.cache || {}, count = newf.count = newf.count || [];
                  if (cache.hasOwnProperty(args)) {
                      repush(count, args);
                      return postprocessor ? postprocessor(cache[args]) : cache[args];
                  }
                  if (count.length >= 1e3) {
                      delete cache[count.shift()];
                  }
                  count.push(args);
                  cache[args] = f.apply(scope, arg);
                  return postprocessor ? postprocessor(cache[args]) : cache[args];
              }
              return newf;
          }
docs: 缓存函数 from raphael.js