Package org.apache.jetspeed.cache

Examples of org.apache.jetspeed.cache.ContentCacheKey


        this.cacheBySessionId = (segments.contains("sessionid"));           
    }
   
    public ContentCacheKey createCacheKey(RequestContext context, String windowId)
    {
        ContentCacheKey key = new JetspeedContentCacheKey(segments, context, windowId);
        return key;
    }
View Full Code Here


        return key;
    }

    public ContentCacheKey createUserCacheKey(String username, String pipeline, String windowId)
    {
        ContentCacheKey key = new JetspeedContentCacheKey();
        key.createFromUser(username, pipeline, windowId);
        return key;
    }
View Full Code Here

        return key;
    }

    public ContentCacheKey createSessionCacheKey(String sessionId, String pipeline, String windowId)
    {
        ContentCacheKey key = new JetspeedContentCacheKey();
        key.createFromSession(sessionId, pipeline, windowId);
        return key;
    }
View Full Code Here

    protected boolean retrieveCachedContent(RequestContext requestContext, ContentFragment fragment,
                                            PortletWindow portletWindow, int expiration,
                                            PortletDefinitionComposite portletDefinition)
        throws Exception
    {
        ContentCacheKey cacheKey = portletContentCache.createCacheKey(requestContext, fragment.getId());       
        CacheElement cachedElement = portletContentCache.get(cacheKey);
        if (cachedElement != null)
        {
            PortletContent portletContent = (PortletContent)cachedElement.getContent();           
            fragment.setPortletContent(portletContent);
View Full Code Here

        return false;
    }
   
    public ContentDispatcherCtrl createDispatcher(RequestContext request, ContentFragment fragment, int expirationCache)
    {
        ContentCacheKey cacheKey = portletContentCache.createCacheKey(request, fragment.getId());               
        PortletContent content = new PortletContentImpl(this, cacheKey, expirationCache);
        ContentDispatcherCtrl dispatcher = new ContentDispatcherImpl(content);
        return dispatcher;
    }
View Full Code Here

            page.setDefaultDecorator(decoratorName, Fragment.LAYOUT);
        }
       
        PageActionAccess pageActionAccess = (PageActionAccess)requestContext.getAttribute(PortalReservedParameters.PAGE_EDIT_ACCESS_ATTRIBUTE);
        String themeCacheKey = null;
        ContentCacheKey themeContentCacheKey = null;
        Theme theme = null;
       
        if (useCache())
        {
            if (pageActionAccess.isEditing() == false)
View Full Code Here

                {
                    notifyFragments(child, context, page);
                }
            }
        }   
        ContentCacheKey cacheKey = portletContentCache.createCacheKey(context, f.getId());
        if (portletContentCache.isKeyInCache(cacheKey))
        {
            portletContentCache.remove(cacheKey);
            portletContentCache.invalidate(context);
        }
View Full Code Here

        }
    }

    protected void clearTargetCache(ContentFragment f, RequestContext context)
    {
        ContentCacheKey cacheKey = portletContentCache.createCacheKey(context, f.getId());       
        if (portletContentCache.isKeyInCache(cacheKey))
        {
            portletContentCache.remove(cacheKey);
            portletContentCache.invalidate(context);           
        }
View Full Code Here

   
    protected void removeFromCache(RequestContext context, String id, JetspeedContentCache cache)
    {
        if (cache == null)
            return;
        ContentCacheKey cacheKey = cache.createCacheKey(context, id);
        if (cache.isKeyInCache(cacheKey))
        {
            cache.remove(cacheKey);
        }
        cache.invalidate(context);
View Full Code Here

        }
    }

    void removeUserEntry(String username, String pipeline, String windowId)
    {       
        ContentCacheKey key = keyGenerator.createUserCacheKey(username, pipeline, windowId);
        if (ehcache.remove(key.getKey()))
        {
            Element userElement = ehcache.get(username);
               
            if (userElement != null)
            {
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.cache.ContentCacheKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.