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 )
{
_log.debug( "...Portlet body found in the cache" );
}
body = ( String ) cacheable.getData( );
}
else
{
if ( debug )
{
_log.debug( "...Portlet dirty. expiring the portlet body" );
}
cacheable.expire( );
body = null;
}
}
}
else