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