public void notifyElementExpired(JetspeedCache cache, boolean local, Object key, Object element) { notifyElementRemoved(cache,local,key,element); }
removeUserEntry(user, "portal", pe); removeUserEntry(user, "desktop", pe);
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); } }
public void invalidate(RequestContext context) { String themeCacheKey = createSessionKey(context); Theme theme = (Theme)context.getRequest().getSession().getAttribute(themeCacheKey); if (theme != null) { theme.setInvalidated(true); } } }
public boolean remove(Object key) { CacheElement element = this.get(key); boolean removed = false; if (element == null) return false; ContentCacheElement ccElement = (ContentCacheElement)element; EhPortletContentCacheElementImpl impl = (EhPortletContentCacheElementImpl)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 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); } }