class AbstractCache implements IDataCache<T> {

  @Override
  public long getCurrentCacheSize() {
    long size = 0;
    lock.readLock().lock();
    try {
      size = currentCacheSize;
    } finally {
      lock.readLock().unlock();
    }
    return size;
  }

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

}