public class IsolatedServiceCachePolicy extends AbstractLogEnabled implements PageElementCachePolicy, Configurable
PageElementCachePolicy
for isolated services (services which don't display
modifiable data from other objects, such as Iframe service).PageElementCachePolicy.PolicyResult
Modifier and Type | Field and Description |
---|---|
protected Set<String> |
_types
The handled types.
|
Constructor and Description |
---|
IsolatedServiceCachePolicy() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Configuration configuration) |
Set<String> |
getPageElementTypes()
Returns the types of the associated page elements.
|
PageElementCachePolicy.PolicyResult |
shouldClearCache(String workspace,
Site site,
String pageElementType,
Event event)
First pass of event processing, at the type level.
Returning NEED_MORE_INFORMATION eventually leads to the second pass, which is more precise, and also depends on a particular element, but is more costly to compute. Returning null means that this policy declares itself as not concerned by the current event. |
PageElementCachePolicy.PolicyResult |
shouldClearCache(String workspace,
Site site,
String pageElementType,
String elementId,
Event event)
Second pass of event processing, at the Page level.
This method is only called if the first pass resulted with NEED_MORE_INFORMATION. |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
public IsolatedServiceCachePolicy()
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public Set<String> getPageElementTypes()
PageElementCachePolicy
getPageElementTypes
in interface PageElementCachePolicy
public final PageElementCachePolicy.PolicyResult shouldClearCache(String workspace, Site site, String pageElementType, Event event)
PageElementCachePolicy
shouldClearCache
in interface PageElementCachePolicy
workspace
- the current JCR workspace.site
- the current site.pageElementType
- the page element type.event
- the current event.public final PageElementCachePolicy.PolicyResult shouldClearCache(String workspace, Site site, String pageElementType, String elementId, Event event)
PageElementCachePolicy
shouldClearCache
in interface PageElementCachePolicy
workspace
- the current JCR workspace.site
- the current site.pageElementType
- the page element type.elementId
- the current element id.event
- the current event.