SpringCache implements Cache { @Override public void clear() { cache.removeAll(); } SpringCache(IgniteCache<Object, Object> cache, SpringCacheManager mgr); @Override String getName(); @Override Object getNativeCache(); @Override ValueWrapper get(Object key); @SuppressWarnings("unchecked") @Override T get(Object key, Class<T> type); @SuppressWarnings("unchecked") @Override T get(final Object key, final Callable<T> valLdr); @Override void put(Object key, Object val); @Override ValueWrapper putIfAbsent(Object key, Object val); @Override void evict(Object key); @Override void clear();  }
@Test public void testClear() throws Exception { String key; springCache.put((key = "key1"), "value1"); assertNotNull(springCache.get(key)); springCache.put((key = "key2"), "value2"); assertNotNull(springCache.get(key)); springCache.put((key = "key3"), "value3"); assertNotNull(springCache.get(key)); springCache.clear(); assertNull(springCache.get("key1")); assertNull(springCache.get("key2")); assertNull(springCache.get("key3")); }