@Override public void evict(Object key) { this.cache.remove(key); }
public void removeUserFromCache(String username) { cache.remove(username); }
public void removeTicketFromCache(final String serviceTicket) { cache.remove(serviceTicket); }
@Override public void evict(Object key) { this.cache.remove(key); }
public void evict(Object key) { this.cache.remove(key); }
@Override public <K> boolean remove(K key) { return ehCache.remove(key); }
@Override public void delete(final String id) { cache.remove(id); }
public void removeUserFromCache(String username) { cache.remove(username); }
/** * Removes the element which matches the key. * * <p>If no element matches, nothing is removed and no Exception is thrown.</p> * * @param key the key of the element to remove */ public V remove(K key) throws CacheException { if (log.isTraceEnabled()) { log.trace("Removing object from cache [" + cache.getName() + "] for key [" + key + "]"); } try { V previous = get(key); cache.remove(key); return previous; } catch (Throwable t) { throw new CacheException(t); } }
@Override public void evictData(Object key) { try { getCache().remove( key ); } catch (ClassCastException | IllegalStateException e) { throw new CacheException( e ); } catch (net.sf.ehcache.CacheException e) { if ( e instanceof NonStopCacheException ) { HibernateNonstopCacheExceptionHandler.getInstance() .handleNonstopCacheException( (NonStopCacheException) e ); } else { throw new CacheException( e ); } } }
/** * {@inheritDoc} */ public boolean remove(Object key, boolean doNotNotifyCacheReplicators) throws IllegalStateException { return underlyingCache.remove(key, doNotNotifyCacheReplicators); }
/** * {@inheritDoc} */ public boolean remove(Serializable key, boolean doNotNotifyCacheReplicators) throws IllegalStateException { return underlyingCache.remove(key, doNotNotifyCacheReplicators); }
/** * {@inheritDoc} */ public boolean remove(Serializable key) throws IllegalStateException { return underlyingCache.remove(key); }
/** * {@inheritDoc} */ @Override public void remove(Object key) throws CacheException { try { ehcache.remove(key); } catch (net.sf.ehcache.CacheException e) { throw new CacheException(e); } }
private void saveOrUpdate(ApiKey apiKey) { if (apiKey.isRevoked() || apiKey.isPaused()) { logger.debug("Remove a paused / revoked api-key from cache [key: {}] [plan: {}] [app: {}]", apiKey.getKey(), apiKey.getPlan(), apiKey.getApplication()); cache.remove(apiKey.getKey()); } else { logger.debug("Cache an api-key [key: {}] [plan: {}] [app: {}]", apiKey.getKey(), apiKey.getPlan(), apiKey.getApplication()); cache.put(new Element(apiKey.getKey(), apiKey)); } }