示例#1
0
 public void testClearCache() {
   SimpleCache cache = new SimpleCache(5, SimpleCache.CACHE_FOREVER);
   cache.put(123, "Val");
   cache.put(234, "Val");
   cache.put(567, "Val");
   cache.put(891, "Val");
   cache.put(111, "Val");
   assertEquals(5, cache.size());
   cache.clearCache();
   assertEquals(0, cache.size());
 }