src/main/java/org/deduplogger/logger/LruCache.java
/*
   * Overwrite the removeEldestEntry function, so the cache will automatically delete the oldest
   * element when the it is full
   */
Overwrite the removeEldestEntry function, so the cache will automatically delete the oldest
element when the it is full
Overwrite the removeEldestEntry function so the cache will automatically delete the oldest element when the it is full
@Override
  protected boolean removeEldestEntry(Map.Entry<String, LogMetadata> eldest) {
    if (size() > capacity) {
      this.msg = eldest.getKey();
      this.evictedEntry = eldest.getValue();
      this.evicted = true;
      return true;
    }
    this.evicted = false;
    return false;
  }
@ Override protected boolean removeEldestEntry ( Map . Entry < String , LogMetadata > eldest ) { if ( size ( ) > capacity ) { this . msg = eldest . getKey ( ) ; this . evictedEntry = eldest . getValue ( ) ; this . evicted = true ; return true ; } this . evicted = false ; return false ; }
Overwrite the removeEldestEntry function, so the cache will automatically delete the oldest
 element when the it is full
Overwrite the removeEldestEntry function so the cache will automatically delete the oldest element when the it is full