IgDiskCache { public void flush() { trimToSizeAndCount(); mJournal.rebuildIfNeeded(); } IgDiskCache(File directory);  IgDiskCache(File directory, Executor serialExecutor);  IgDiskCache(File directory, long maxSizeInBytes);  IgDiskCache(File directory, long maxSizeInBytes, Executor serialExecutor);  IgDiskCache(File directory, long maxSizeInBytes, int maxCount);  IgDiskCache(File directory, long maxSizeInBytes, int maxCount, Executor serialExecutor); boolean has(String key); OptionalStream<SnapshotInputStream> get(String key); OptionalStream<EditorOutputStream> edit(String key); void remove(String key); void flush(); void close(); File getDirectory(); long getMaxSizeInBytes(); int getMaxCount(); void setMaxSizeInBytes(long maxSizeInBytes); long size(); int count(); final String getHitRateString();  }
@Test public void cacheSingleValueOfSizeGreaterThanMaxSize() throws Exception { mCache = new IgDiskCache(mCacheDir, 5); set(mCache, "a", "aaaaaa"); mCache.flush(); assertAbsent(mCache, "a"); }