class AbstractCache implements IDataCache<T> {

  @Override
  public void clearCache() {
    lock.writeLock().lock();
    try {
      entries.clear();
      currentCacheSize = 0;
    } finally {
      lock.writeLock().unlock();
    }
  }

  public  AbstractCache(S entries, IDataStorage<T> cachedStorage, long maxCacheSize,
      Predicate<T> cachingRule);

}