示例#1
0
 @Override
 public boolean remove(String imageUri) {
   try {
     return cache.remove(getKey(imageUri));
   } catch (IOException e) {
     L.e(e);
     return false;
   }
 }
示例#2
0
 private void trimToFileCount() throws IOException {
   while (fileCount > maxFileCount) {
     Map.Entry<String, Entry> toEvict = lruEntries.entrySet().iterator().next();
     remove(toEvict.getKey());
   }
 }
示例#3
0
 private void trimToSize() throws IOException {
   while (size > maxSize) {
     Map.Entry<String, Entry> toEvict = lruEntries.entrySet().iterator().next();
     remove(toEvict.getKey());
   }
 }