public void clear() { ehCache.removeAll(); }
private void clearCache(String cacheId) { final List<CacheManager> allCacheManagers = CacheManager.ALL_CACHE_MANAGERS; for (final CacheManager cacheManager : allCacheManagers) { final Cache cache = cacheManager.getCache(cacheId); if (cache != null) { cache.removeAll(); } } }
/** * 删除全部缓存记录 * @param cacheName * @return */ public static void removeAll(String cacheName) { Cache cache = getCache(cacheName); if (null != cache) { cache.removeAll(); } }
@Override public void clearAdminSecurityCache() { if (LOG.isTraceEnabled()) { LOG.trace("Admin Security Cache DELETE"); } cache.removeAll(); }
public static void removeAll(String cacheName) { getOrAddCache(cacheName).removeAll(); }
public static void removeAll(String cacheName) { getOrAddCache(cacheName).removeAll(); }
public void cleanDataCache(String project) { if (cacheManager != null) { if (getConfig().isQueryCacheSignatureEnabled()) { logger.info("cleaning cache for project " + project + " (currently remove nothing)"); } else { logger.info("cleaning cache for project " + project + " (currently remove all entries)"); cacheManager.getCache(QueryService.QUERY_CACHE).removeAll(); } } else { logger.warn("skip cleaning cache for project " + project); } }
/** * Remove all items from the underlying cache - a complete clear * * @param cacheName the name of the cache - the ehcache region name */ protected void clearCache(String cacheName) { if (getLogger().isTraceEnabled()) { getLogger().trace("Evicting all keys from the [" + cacheName + "] cache."); } getCache(cacheName).removeAll(); }
/** * Clear out the cache since the SystemPropertiesService/Dao will have cached a not found */ protected void clearSystemPropertiesCache() { try { Method m = AbstractCacheMissAware.class.getDeclaredMethod("getCache", new Class<?>[] {String.class}); m.setAccessible(true); Cache cache = (Cache) m.invoke(propsDao, "blSystemPropertyNullCheckCache"); cache.removeAll(); m = SystemPropertiesServiceImpl.class.getDeclaredMethod("getSystemPropertyCache"); m.setAccessible(true); cache = (Cache) m.invoke(propsSvc); cache.removeAll(); } catch (NoSuchMethodException|SecurityException|IllegalAccessException|IllegalArgumentException|InvocationTargetException e) { throw new RuntimeException(e); } }
@Override public void clear() { String[] cacheNames = getCacheManager().getCacheNames(); if (cacheNames != null) { for (String cacheName : cacheNames) { Cache cache = getRegion(cacheName); cache.removeAll(); } } }
/** * Removes all cached items. * Terracotta clustered caches may require more time to execute this operation because cached items must also be removed from the Terracotta Server Array. Synchronization is handled within the method. * <p> * Caches which use synchronous replication can throw RemoteCacheException here if the replication to the cluster fails. * This exception should be caught in those circumstances. * * @throws IllegalStateException if the cache is not {@link Status#STATUS_ALIVE} */ public void removeAll() throws IllegalStateException, CacheException { removeAll(false); }
/** * {@inheritDoc} */ public void removeAll(final Collection<?> keys) throws IllegalStateException { removeAll(keys, false); }
@Override public void evictAll() { if(isAlive()) { ehcache.removeAll(); } }
public void clear() { if (manager != null) { Cache cache = manager .getCache(ehcacheConf.getPredefinedCacheName()); cache.removeAll(); } }
@Override protected void doStop() throws Exception { if (enabled) { super.doStop(); if (executorService != null) { executorService.shutdown(); } LOGGER.info("Clear API keys from in-memory cache before stopping service"); cache.removeAll(); cache.dispose(); } }
@Override protected void doStop() throws Exception { if (enabled) { super.doStop(); if (executorService != null) { executorService.shutdown(); } LOGGER.info("Clear subscriptions from cache before stopping service"); cache.removeAll(); cache.dispose(); } }
public void stop() { Cache cache = manager.getCache(ehcacheConf.getPredefinedCacheName()); cache.removeAll(); manager.removeCache(ehcacheConf.getPredefinedCacheName()); manager.removalAll(); manager.clearAll(); manager.shutdown(); manager = null; }
@Override public void clearAll() { for (Cache cache : caches.values()) { cache.removeAll(); } }
/** {@inheritDoc} */ @Override public void clear() { wrapper.getCacheFeatures().removeAll(); } }
/** {@inheritDoc} */ @Override public void clear() { wrapper.getCacheProperties().removeAll(); }