Package org.ametys.web.cache.service
Class SitemapServiceCachePolicy
- java.lang.Object
-
- org.ametys.web.cache.pageelement.AbstractSimplePageElementCachePolicy
-
- org.ametys.web.cache.pageelement.AbstractACLPageElementCachePolicy
-
- org.ametys.web.cache.service.SitemapServiceCachePolicy
-
- All Implemented Interfaces:
PageElementCachePolicy
public class SitemapServiceCachePolicy extends AbstractACLPageElementCachePolicy
PageElementCachePolicy
for the Sitemap service.
This implementation does not handle virtual pages based on Contents, so that it does not remove cache when Content change.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.web.cache.pageelement.PageElementCachePolicy
PageElementCachePolicy.PolicyResult
-
-
Field Summary
Fields Modifier and Type Field Description static String
SERVICE_SITEMAP_ID
The sitemap service ID.
-
Constructor Summary
Constructors Constructor Description SitemapServiceCachePolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<String>
_getRemovingCacheEventIds(String workspace)
Returns all event ids for which the cache should be removed.protected boolean
_supports(Event event, String workspace)
Checks if the event is supported.Set<String>
getPageElementTypes()
Returns the types of the associated page elements.-
Methods inherited from class org.ametys.web.cache.pageelement.AbstractSimplePageElementCachePolicy
shouldClearCache, shouldClearCache
-
-
-
-
Field Detail
-
SERVICE_SITEMAP_ID
public static final String SERVICE_SITEMAP_ID
The sitemap service ID.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SitemapServiceCachePolicy
public SitemapServiceCachePolicy()
-
-
Method Detail
-
getPageElementTypes
public Set<String> getPageElementTypes()
Description copied from interface:PageElementCachePolicy
Returns the types of the associated page elements.- Returns:
- the types of the associated page elements.
-
_supports
protected boolean _supports(Event event, String workspace)
Description copied from class:AbstractSimplePageElementCachePolicy
Checks if the event is supported.- Overrides:
_supports
in classAbstractACLPageElementCachePolicy
- Parameters:
event
- The eventworkspace
- The JCR workspace.- Returns:
- If true, the cache should be clear
-
_getRemovingCacheEventIds
protected List<String> _getRemovingCacheEventIds(String workspace)
Description copied from class:AbstractSimplePageElementCachePolicy
Returns all event ids for which the cache should be removed.- Specified by:
_getRemovingCacheEventIds
in classAbstractSimplePageElementCachePolicy
- Parameters:
workspace
- the current JCR workspace.- Returns:
- all event ids for which the cache should be removed.
-
-