Thread-Safe @param key The asset key to find the asset to delete. @return True if the asset was successfully found in the cacheand removed.
232233234235236237238239240241242
} public <T> boolean deleteFromCache(AssetKey<T> key) { AssetCache cache = handler.getCache(key.getCacheType()); if (cache != null) { return cache.deleteFromCache(key); } else { throw new IllegalArgumentException("Key " + key + " specifies no cache."); } }
7374757677787980818283
cache.addToCache(id, null); assertTrue(cache.contains(id)); cache.deleteFromCache(id); assertFalse(cache.contains(id)); cache.deleteFromCache(id);
7778798081828384858687
cache.deleteFromCache(id); assertFalse(cache.contains(id)); cache.deleteFromCache(id); } public void testDuplicateNonPersistent() throws Exception