cache.js
function Cache(maxSize, debug, storage) {
    this.maxSize_ = maxSize || -1;
    this.debug_ = debug || false;
    this.storage_ = storage || new Cache.BasicCacheStorage();

    this.fillFactor_ = .75;

    this.stats_ = {};
    this.stats_['hits'] = 0;
    this.stats_['misses'] = 0;
    this.log_('Initialized cache with size ' + maxSize);
}
function Cache(maxSize, debug, storage) {
    this.maxSize_ = maxSize || -1;
    this.debug_ = debug || false;
    this.storage_ = storage || new Cache.BasicCacheStorage();

    this.fillFactor_ = .75;

    this.stats_ = {};
    this.stats_['hits'] = 0;
    this.stats_['misses'] = 0;
    this.log_('Initialized cache with size ' + maxSize);
}
function Cache ( maxSize , debug , storage ) { this . maxSize_ = maxSize || - 1 ; this . debug_ = debug || false ; this . storage_ = storage || new Cache . BasicCacheStorage ( ) ; this . fillFactor_ = .75 ; this . stats_ = { } ; this . stats_ [ 'hits' ] = 0 ; this . stats_ [ 'misses' ] = 0 ; this . log_ ( 'Initialized cache with size ' + maxSize ) ; }
Creates a new Cache object.
@param {number} maxSize The maximum size of the cache (or -1 for no max).
@param {boolean} debug Whether to log events to the console.log.
@constructor
Creates a new Cache object .