@private

@description

Cache manager abstraction.
Handles all the different caches used by the SDK
@constructor
329691
function CacheManager() {
  var self = this;
  self.caches = {};

  Object.defineProperty(self, 'stats', {
    get: function () {
      return Object.keys(self.caches).reduce(function(a,region){
        a[region] = self.caches[region].stats;
        return a;
      },{});
    }
  });
}
623092
function Cacherrr() {
      var expire = arguments.length <= 0 || arguments[0] === undefined ? 0 : arguments[0];
      var exclude = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];

      _classCallCheck(this, Cacherrr);

      // time for cache to expire
      this.expire = expire;
      // array of paths to be excluded from caching
      this.exclude = exclude;
      // cache entries
      this.entries = {};
    }
181765
function MempoolCache(options) {
  if (!(this instanceof MempoolCache))
    return new MempoolCache(options);

  this.logger = options.logger;
  this.chain = options.chain;
  this.network = options.network;
  this.db = null;
  this.batch = null;

  if (options.persistent)
    this.db = LDB(options);
}
980028
def cache(key, options = {}, &block) # :doc:
        if cache_configured?
          cache_store.fetch(ActiveSupport::Cache.expand_cache_key(key, :controller), options, &block)
        else
          yield
        end
      end
654762
function clear() {
        var cache = caches[this.name];
        if (cache && cache.flush && !redisOffline) {
            cache.flush();
        }
    }
734780
function clearCache() {
  cache_stopById.clear();
  cache_stopByName.clear();
  cache_stopByStatusId.clear();
  cache_stops.clear();
  cache_stopsByRoute.clear();
}
927746
function cacheGet(key, options) {
    if (shouldCache(options)) {
      return;
    }

    if (self.options.cache === 'memory') {
      return self.cache[key];
    }

    return self.options.cache.get(key);
  }
270086
function () {
            var min = this.options.min,
                max = this.options.max,
                from = this.options.from,
                to = this.options.to;

            if (from > min && to === max) {
                this.$cache.s_from.addClass("type_last");
            } else if (to < max) {
                this.$cache.s_to.addClass("type_last");
            }
        }
1320745
function memoize(func) {
  const cache = new Map();

  return input => {
    let output = cache.get(input);

    if (output === undefined) {
      output = func(input);
      cache.set(input, output);
    }

    return output;
  };
}
827214
def inheritable_cache #:nodoc:
      # do not store keys on each access, only return default structure
      @inheritable_cache ||= Hash.new do |h1, k1| 
        Hash.new do |h2, k2| 
          Hash.new do |h3, k3| 
            Hash.new 
          end
        end
      end
    end
1152884
function createCache(array) {
    var index = -1,
        length = array.length;

    var cache = getObject();
    cache['false'] = cache['null'] = cache['true'] = cache['undefined'] = false;

    var result = getObject();
    result.array = array;
    result.cache = cache;
    result.push = cachePush;

    while (++index < length) {
      result.push(array[index]);
    }
    return cache.object === false
      ? (releaseObject(result), null)
      : result;
  }
459042
function init(){
    if(!cacheServiceConfig) {
      cacheServiceConfig = {};
    }
    self.nameSpace = cacheServiceConfig.nameSpace || '';
    self.verbose = (typeof cacheServiceConfig.verbose === 'boolean') ? cacheServiceConfig.verbose : false;
    self.writeToVolatileCaches = (typeof cacheServiceConfig.writeToVolatileCaches === 'boolean') ? cacheServiceConfig.writeToVolatileCaches : true;
    self.caches = new CacheCollection({nameSpace: self.nameSpace, verbose: self.verbose}, cacheModules).caches;
    self.cachesLength = self.caches.length;
  }
485589
function Cache(opts) {
	//debug.log('new Cache');

	opts = opts || {};
	debug.assert(opts).is('object');

	/** {boolean} True if this cache is using cursors */
	this._has_cursors = opts.cursors ? true : false;

	// All cursors in a VariableStore
	if(this._has_cursors) {
		this._cursors = new VariableStore();
		this._parents = new VariableStore();
		this._cursor_map = {};
	}

	/** Store for all objects */
	this.objects = new VariableStore();

	/** Array of current parents of the element which we are scanning -- this is used to find circular references */
	this._current_parents = [];

	/** Array of cursors pointing to circular references */
	this.circulars = [];

}
306520
function(overrides) { 
      var result = this.cache;
      if(!result) {
        result = construct(type, functionParameters(type).map(function(paramName) {
          return self.resolve(paramName, overrides);
        }));
      }
      if(doCache) {
        this.cache = result;
      }
      return result;
    }
447534
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('\u2400'),
                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;
    }
91595
function handler (fn, options) {
  /*jshint validthis:true */

  var cache,
      // Extend default options
      settings = extend({}, this.options, options);

  cache = new Cache(fn, settings);
  this.caches.push(cache);
  return cache;
}
504611
function() {
                var instance = Toolkit.cache[plugin + ':' + this.selector] = callback.apply(this, arguments);

                return this.each(function() {
                    $(this).cache('toolkit.' + plugin, instance);
                });
            }