@Override
  public EntryEvictionComparator get() {
    return new EntryEvictionComparator() {

      long now = System.currentTimeMillis();

      /** Return <0 if lhs should be evicted before rhs. */
      @Override
      public int compare(DiskStorage.Entry lhs, DiskStorage.Entry rhs) {
        float score1 = calculateScore(lhs, now);
        float score2 = calculateScore(rhs, now);
        return score1 < score2 ? 1 : ((score2 == score1) ? 0 : -1);
      }
    };
  }
Evicts cache items based on a mix of their size and timestamp.
imagepipeline-base/src/main/java/com/facebook/cache/disk/ScoreBasedEvictionComparatorSupplier.java