|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPageCacheManager
Provides page cache operations.
lumis.portal.page.cache
Nested Class Summary | |
---|---|
static class |
IPageCacheManager.GenerationOutcome
Indicates the outcome of a page generation. |
Field Summary | |
---|---|
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
|
Method Summary | |
---|---|
void |
clearAllHTMLCache(ITransaction transaction)
Clears all page HTML cache. |
void |
clearCacheByChannelIds(SessionConfig sessionConfig,
Collection<String> channelIds,
Map<String,String[]> parameters,
int changeType,
boolean clearImmediately,
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,
boolean clearImmediately,
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. |
PageCacheConfig |
generateNextPage(boolean forImmediateUseOnly)
Generates next outdated page cache, according to its priority. |
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. |
void |
pageCacheMissedByFilePath(String filePath,
boolean forImmediateUse)
Indicates a miss in the page cache occurred. |
String |
processHTMLForPageCache(String htmlContent,
PageCacheConfig pageCache,
boolean convertGuestOnlyCaches)
Processes a HTML code for storing for a page cache. |
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. |
Field Detail |
---|
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
Method Detail |
---|
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
PageCacheConfig generateNextPage(boolean forImmediateUseOnly) throws PortalException
forImmediateUseOnly
- if true, only pages whose priority is higher
than PageCacheConfig.MAX_INITIAL_PRIORITY
are taken in account.
PortalException
void clearCacheByPagesIds(SessionConfig sessionConfig, Collection<String> pagesIds, Map<String,String[]> parameters, Locale locale, int changeType, boolean clearImmediately, ITransaction transaction) throws PortalException
clearImmediately
is set to true
,
it will also clear the specified pages cache immediately, synchronously.
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.clearImmediately
- if the cache clearing is also to be executed
immediately.transaction
- the transaction for persistence access.
PortalException
void clearCacheByChannelIds(SessionConfig sessionConfig, Collection<String> channelIds, Map<String,String[]> parameters, int changeType, boolean clearImmediately, ITransaction transaction) throws PortalException
clearImmediately
is set to true
,
it will also clear the specified pages cache immediately, synchronously.
sessionConfig
- the user session information.pagesIds
- a collection of the pages identifiers.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.clearImmediately
- if the cache clearing is also to be executed
immediately.transaction
- the transaction for persistence access.
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
String processHTMLForPageCache(String htmlContent, PageCacheConfig pageCache, boolean convertGuestOnlyCaches) throws PortalException
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
@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
void pageCacheMissedByFilePath(String filePath, 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.
PortalObjectNotFoundException
- if no page cache for the specified
file path was found.
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |