Package lumis.portal.page.cache
Implements the portal's page HTML cache engine. Generates the HTML for
pages with cache enabled and handles requests for missing caches.
Overview
IPageCacheManager
is the main entry point
for this package. An instance of this interface may be obtained by calling
{@link lumis.portal.manager.ManagerFactoryInternal.getPageCacheManager()}.
A generator runs in the background, generating the cache for pages outdated.
PageRenderDataChangedEvent
events are observed,
invalidating the corresponding caches as appropriated.
Shadow cache, when enabled, saves the generated HTML in a second-level cache. When page cache is requested but not present, the shadow cache copy is used if available.
The global configuration for the HTML cache feature is encapsulated by
HtmlGenerationConfig
, available in
PortalContext.getHtmlGenerationConfig()
. This
configuration is done in the lumisportalconfig.xml file.
Scoped configurations exist in PageCacheQueue
,
PageCacheGeneratorProfile
and PageCacheGeneratorConfig
.
Generator
The generator contains a pool of threads that generates the HTML for pages that have their cache outdated. The choice of the order of page generation is composed for a set of factors, including user demand, page characteristics and priority configurations.Cache states
The following diagram shows the cache state flow while no user interference happens:Requests for cached pages
The following activity diagram shows how requests for cached pages are processed:- Since:
- 4.0.0
- Version:
- $Revision: 12879 $ $Date: 2011-05-03 08:26:37 -0300 (Tue, 03 May 2011) $
-
Interface Summary Interface Description IPageCacheManager Provides page cache operations.IPageCacheManagerSPI Manager responsible for page cache related internal operations.IPageCacheQueueResolver Resolves the generation queue to be used for the cache of a web resource. -
Class Summary Class Description DefaultPageCacheQueueResolver The default resolver for a cache's generation queue.HtmlGenerationConfig Contains configurations for the cache HTML generation.PageCacheConfig Stores information about the caching of a page.PageCacheControllerHtml Contains implementations for handling HTTP requests specific for page HTML cache scenarios.PageCacheGeneratorProfile Contains the configurations for cache generation.PageCacheManager Manager for page cache information.PageCacheMonitorUtil Utility class for page cache monitoring.PageCacheObserver Observer that clears page caches according to the notifications received.PageCacheSSIFilter Servlet filter
responsible for replacing include start string ("<!--#include") for a customized one ("<!--LumisInclude") after the processing of the request.PageCacheUtil Utility class for dealing with page cache.PCGeneratorConfig Page cache generator configuration. -
Enum Summary Enum Description PageCacheMonitorUtil.Event Enumeration ofmonitoring events
configurations related to page cache.PageCacheMonitorUtil.Field Enumeration ofmeasure types
configurations related to page cache monitoring. -
Exception Summary Exception Description PageCacheControllerHtml.PageUnavailableException Exception thrown when the requested page is temporarily unavailable, for example, due to timeout in the page generation.