Package net.sf.jportlet.service.cache

Examples of net.sf.jportlet.service.cache.CacheRegion


        boolean             debug = _log.isDebugEnabled(  );
        CacheDescriptor     cache = _descriptor.getCacheDescriptor( request.getMode(  ) );
        String              id = getCacheableId( cache, request, response );
        PortletResponseImpl response2 = new PortletResponseImpl( this, request, response.getHttpResponse(  ) );
        String              body = null;
        CacheRegion         region = null;
        Cacheable           cacheable;

        /* Load the body from the cache */
        if ( id != null )
        {
            if ( debug )
            {
                _log.debug( "Loading portlet body from the cache.id=" + id );
            }

            region    = getCacheRegion(  );
            cacheable = region.get( id );
            if ( cacheable != null )
            {
                if ( !isDirty( request ) )
                {
                    if ( debug )
View Full Code Here


        if ( id != null )
        {
            PortletResponseImpl resp = ( PortletResponseImpl ) response;
            PortletDescriptor   descr = proxy.getDescriptor(  );
            CacheDescriptor     cache = descr.getCacheDescriptor( request.getMode(  ) );
            CacheRegion         region = getCacheService( proxy ).getRegion( descr.getName(  ), true );
            CacheableImpl       cacheable = new CacheableImpl( id, resp.getBuffer(  ).toString(  ), 1000 * cache.getExpires(  ) );

            if ( debug )
            {
                __log.debug( "Caching portlet content:" + id );
            }

            region.put( cacheable );
        }
    }
View Full Code Here

        }

        if ( id != null )
        {
            /* Get the cacheable object */
            CacheRegion region = getCacheService( proxy ).getRegion( proxy.getDescriptor(  ).getName(  ), true );
            Cacheable   cacheable = region.get( id );
            if ( cacheable != null )
            {
                if ( !proxy.isDirty( request ) )
                {
                    if ( debug )
View Full Code Here

TOP

Related Classes of net.sf.jportlet.service.cache.CacheRegion

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.