/** * Records a cache miss. This is how new entries join the LIRS stack and * queue. This is called both when a new entry is first created, and when a * non-resident entry is re-computed. */ private Set<HashEntry<K, V>> miss() { Set<HashEntry<K, V>> evicted = Collections.emptySet(); if ( owner.hotSize < owner.maximumHotSize ) { warmupMiss(); } else { evicted = new HashSet<HashEntry<K, V>>(); fullMiss( evicted ); } // now the missed item is in the cache owner.size++; return evicted; }
/** * Records a cache miss. This is how new entries join the LIRS stack and * queue. This is called both when a new entry is first created, and when a * non-resident entry is re-computed. */ private Set<HashEntry<K, V>> miss() { Set<HashEntry<K, V>> evicted = Collections.emptySet(); if ( owner.hotSize < owner.maximumHotSize ) { warmupMiss(); } else { evicted = new HashSet<HashEntry<K, V>>(); fullMiss( evicted ); } // now the missed item is in the cache owner.size++; return evicted; }