public interface IPageCacheManager
lumis.portal.page.cache
Modifier and Type | Interface and Description |
---|---|
static class |
IPageCacheManager.GenerationOutcome
Indicates the outcome of a page generation.
|
Modifier and Type | Field and Description |
---|---|
static int |
CLEAR_CACHE_CHANGE_TYPE_DELETE |
static int |
CLEAR_CACHE_CHANGE_TYPE_UPDATE |
static int |
PAGE_CACHE_GEN_STATE_DISABLED |
static int |
PAGE_CACHE_GEN_STATE_ENABLED |
Modifier and Type | Method and Description |
---|---|
void |
clearAllHTMLCache(ITransaction transaction)
Clears all page HTML cache.
|
void |
clearCacheByChannelIds(SessionConfig sessionConfig,
Collection<String> channelIds,
Map<String,String[]> parameters,
int changeType,
ITransaction transaction)
Clear the cache of the pages within the specified channels recursively.
|
void |
clearCacheByPagesIds(SessionConfig sessionConfig,
Collection<String> pagesIds,
Map<String,String[]> parameters,
Locale locale,
int changeType,
ITransaction transaction)
Clear the cache of the specified pages.
|
void |
clearPageCacheErrors(Collection<String> pageCacheIds,
ITransaction transaction)
Clear page cache errors in the database.
|
void |
delete(SessionConfig sessionConfig,
String pageCacheId,
ITransaction transaction)
Delete a page cache.
|
void |
expirePageCache(PageCacheConfig pageCacheConfig)
Expires a single
PageCacheConfig . |
PageCacheConfig |
generatePage(String pageCacheId)
Generates a page cache.
|
PageCacheConfig |
get(String pageCacheId)
Returns a page cache given its identifier.
|
int |
getPageCacheGenerationState(SessionConfig sessionConfig,
ITransaction transaction)
Deprecated.
Since 5.0.0, replaced by
isPageCacheGenerationEnabled()
for better performance and easier use. |
boolean |
isPageCacheGenerationEnabled()
Indicates if the page cache generation is globally enabled.
|
void |
pageCacheMissed(String pageCacheId,
boolean forImmediateUse)
Indicates a miss in the page cache occurred.
|
String |
processHTMLForPageCache(String htmlContent,
PageCacheConfig pageCache)
Processes a HTML code for storing for a page cache.
|
default String |
processHTMLForPageCache(String htmlContent,
PageCacheConfig pageCache,
boolean convertGuestOnlyCaches)
Deprecated.
since 10.3.0 replaced by
processHTMLForPageCache(String, PageCacheConfig) . From the version 10.3.0 on,
the parameter convertGuestOnlyCaches is ignored. |
void |
setPageCacheGenerationState(SessionConfig sessionConfig,
int state,
ITransaction transaction)
Sets the page cache generation state
|
void |
updateCachedFilesLastModifiedDate(SessionConfig sessionConfig,
PageConfig pageConfig,
Locale locale,
Date lastModifiedDate,
ITransaction transaction)
Updates the last modified date of the cached files that match the given pageId and locale.
|
String |
waitForGeneration(String pageCacheId,
long timeout)
Waits for the generation of a page cache.
|
void |
waitForPagesReadyToGenerate(long timeout,
boolean forImmediateUseOnly)
Waits for new pages to be ready to be generated.
|
static final int PAGE_CACHE_GEN_STATE_ENABLED
static final int PAGE_CACHE_GEN_STATE_DISABLED
static final int CLEAR_CACHE_CHANGE_TYPE_UPDATE
static final int CLEAR_CACHE_CHANGE_TYPE_DELETE
PageCacheConfig get(String pageCacheId) throws PortalException
pageCacheId
- the page cache identifier.PortalObjectNotFoundException
- if no page cache with the given
identifier was found.PortalException
void delete(SessionConfig sessionConfig, String pageCacheId, ITransaction transaction) throws ManagerException, PortalException
sessionConfig
- pageCacheId
- transaction
- ManagerException
PortalException
PageCacheConfig generatePage(String pageCacheId) throws PortalException
pageCacheId
- the page cache identifier.PortalException
void clearCacheByPagesIds(SessionConfig sessionConfig, Collection<String> pagesIds, Map<String,String[]> parameters, Locale locale, int changeType, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.pagesIds
- a collection of the pages identifiers.parameters
- the page parameters. Used to filter which caches
are cleared.locale
- specifies the locale to which the cache clearing is to
be applied. May be null to indicate any locale.changeType
- the cause of the cache clear. Must be one of the
CLEAR_CACHE_CHANGE_TYPE_* constants.transaction
- the transaction for persistence access.PortalException
void clearCacheByChannelIds(SessionConfig sessionConfig, Collection<String> channelIds, Map<String,String[]> parameters, int changeType, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.parameters
- the page parameters. Used to filter which caches
are cleared.changeType
- the cause of the cache clear. Must be one of the
CLEAR_CACHE_CHANGE_TYPE_* constants.transaction
- the transaction for persistence access.pagesIds
- a collection of the pages identifiers.PortalException
void clearAllHTMLCache(ITransaction transaction) throws PortalException
transaction
- the transaction for persistence access.PortalException
void clearPageCacheErrors(Collection<String> pageCacheIds, ITransaction transaction) throws PortalException
pageCacheIds
- the page cache identifiers.transaction
- the transaction for persistence access.PortalException
@Deprecated default String processHTMLForPageCache(String htmlContent, PageCacheConfig pageCache, boolean convertGuestOnlyCaches) throws PortalException
processHTMLForPageCache(String, PageCacheConfig)
. From the version 10.3.0 on,
the parameter convertGuestOnlyCaches is ignored.htmlContent
- HTML code.pageCache
- the page cache the code will be used in.convertGuestOnlyCaches
- if true, pages with cache enabled only for
guest will also have their dynamic paths converted.PortalException
String processHTMLForPageCache(String htmlContent, PageCacheConfig pageCache) throws PortalException
htmlContent
- HTML code.pageCache
- the page cache the code will be used in.PortalException
void expirePageCache(PageCacheConfig pageCacheConfig) throws PortalException
PageCacheConfig
.pageCacheConfig
- the page cache to expired.PortalException
@Deprecated int getPageCacheGenerationState(SessionConfig sessionConfig, ITransaction transaction) throws PortalException
isPageCacheGenerationEnabled()
for better performance and easier use.sessionConfig
- transaction
- PortalException
boolean isPageCacheGenerationEnabled()
true
if enabled, false
otherwise.void setPageCacheGenerationState(SessionConfig sessionConfig, int state, ITransaction transaction) throws PortalException
sessionConfig
- state
- transaction
- PortalException
void updateCachedFilesLastModifiedDate(SessionConfig sessionConfig, PageConfig pageConfig, Locale locale, Date lastModifiedDate, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.pageConfig
- the portal page.locale
- locale for which the cached files needs to be modified.lastModifiedDate
- date to which the matched files must be modified to.transaction
- the transaction for persistence access.PortalException
String waitForGeneration(String pageCacheId, long timeout) throws PortalException, InterruptedException
pageCacheId
- the page cache identifier.timeout
- maximum time to wait.InterruptedException
- if the thread was interrupted.PortalException
void waitForPagesReadyToGenerate(long timeout, boolean forImmediateUseOnly) throws PortalException, InterruptedException
timeout
- maximum time to wait.forImmediateUseOnly
- if true, wait until a page for
immediate use is ready to generate. If false, wait until any page is
ready to generate.InterruptedException
- if the thread was interrupted.PortalException
void pageCacheMissed(String pageCacheId, boolean forImmediateUse) throws PortalException
pageCacheId
- the page cache identifier.forImmediateUse
- if true, indicates that the missed page cache
is required for immediate use. This will greater boost the priority to
generate the corresponding page cache.IllegalStateException
- if the specified page cache cannot be
generated due to its current state or the page cache framework's state.PortalException
LumisXP 12.2.0.200122 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.