public void notifyElementExpired(JetspeedCache cache, boolean local, Object key, Object element) { notifyElementRemoved(cache,local,key,element); }
public void invalidate(RequestContext context) { ContentPage page = context.getPage(); ContentCacheKey themeContentCacheKey = createCacheKey(context, page.getId()); CacheElement themeCacheElem = get(themeContentCacheKey); if (themeCacheElem != null) { Theme theme = (Theme) themeCacheElem.getContent(); theme.setInvalidated(true); } } }
public void evictContentForUser(String username) { Element userElement = saveGet(username); if (userElement != null) { Map map = (Map)userElement.getObjectValue(); if (map != null) { Iterator entities = map.values().iterator(); while (entities.hasNext()) { ContentCacheKey ccKey = (ContentCacheKey)entities.next(); ehcache.remove(ccKey.getKey()); } } ehcache.remove(username); } }
removeUserEntry(user, "theme", te);
public boolean remove(Object key) { CacheElement element = this.get(key); boolean removed = false; if (element == null) return false; ContentCacheElement ccElement = (ContentCacheElement)element; EhDecorationContentCacheElementImpl impl = (EhDecorationContentCacheElementImpl)element; Element ehl = impl.getImplElement(); String userKey = ccElement.getContentCacheKey().getSessionId(); if (userKey == null) { userKey = ccElement.getContentCacheKey().getUsername(); } String windowId = ccElement.getContentCacheKey().getWindowId(); removed = ehcache.remove(ccElement.getContentCacheKey().getKey()); Element userElement = ehcache.get(userKey); if (userElement != null) { Map map = (Map)userElement.getObjectValue(); if (map != null) { map.remove(windowId); } } return removed; }
public void evictContentForSession(String session) { Element userElement = saveGet(session); if (userElement != null) { Map map = (Map)userElement.getObjectValue(); if (map != null) { Iterator entities = map.values().iterator(); while (entities.hasNext()) { ContentCacheKey ccKey = (ContentCacheKey)entities.next(); ehcache.remove(ccKey.getKey()); } } ehcache.remove(session); } }