addCache(newCache) {
        let index = this.getCacheIndexById(newCache.id)
        if (index  == -1) {
            this.cQueue.push(newCache);
            if (this.cQueue.length > this.limit) {
                this.cQueue.shift();
            }
        }
    }
//adds a new cache to the end of the queue and removes the caches at the front if the limit is surpassed.
adds a new cache to the end of the queue and removes the caches at the front if the limit is surpassed.
adds a new cache to the end of the queue and removes the caches at the front if the limit is surpassed .
addCache(newCache) {
        let index = this.getCacheIndexById(newCache.id)
        if (index  == -1) {
            this.cQueue.push(newCache);
            if (this.cQueue.length > this.limit) {
                this.cQueue.shift();
            }
        }
    }
addCache ( newCache ) { let index = this . getCacheIndexById ( newCache . id ) if ( index == - 1 ) { this . cQueue . push ( newCache ) ; if ( this . cQueue . length > this . limit ) { this . cQueue . shift ( ) ; } } }
adds a new cache to the end of the queue and removes the caches at the front if the limit is surpassed.
adds a new cache to the end of the queue and removes the caches at the front if the limit is surpassed .