Package org.opencms.ade.configuration
Class CmsDetailNameCache
java.lang.Object
org.opencms.ade.configuration.CmsDetailNameCache
- All Implemented Interfaces:
I_CmsGlobalConfigurationCache
A cache which stores structure ids for URL names.
Note that this cache may in some cases contain outdated structure ids for URL names, if an URL name has been removed for a content but is not yet mapped to a different content.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringRequest attribute for telling the link substitution handler that it shouldn't use this cache.static final intThe delay between updates. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the cache.getDetailId(String name) Gets the structure id for a given URL name.voidInitializes the cache by scheduling the update actions and loading the initial cache contents.voidremove(CmsPublishedResource pubRes) Removes a published resource from the cache.voidremove(CmsResource resource) Removes a resource from the cache.voidupdate(CmsPublishedResource pubRes) Updates the cache entry for the given published resource.voidupdate(CmsResource resource) Updates the cache entry for the given resource.voidWaits until the cache is potentially updated for the next time.
-
Field Details
-
DELAY_MILLIS
The delay between updates.- See Also:
-
ATTR_BYPASS
Request attribute for telling the link substitution handler that it shouldn't use this cache.- See Also:
-
-
Constructor Details
-
CmsDetailNameCache
Creates a new instance.- Parameters:
cms- the CMS context to use
-
-
Method Details
-
clear
Description copied from interface:I_CmsGlobalConfigurationCacheClears the cache.- Specified by:
clearin interfaceI_CmsGlobalConfigurationCache- See Also:
-
getDetailId
Gets the structure id for a given URL name.- Parameters:
name- the URL name- Returns:
- the structure id for the URL name
-
initialize
Initializes the cache by scheduling the update actions and loading the initial cache contents. -
remove
Description copied from interface:I_CmsGlobalConfigurationCacheRemoves a published resource from the cache.- Specified by:
removein interfaceI_CmsGlobalConfigurationCache- Parameters:
pubRes- the published resource- See Also:
-
remove
Description copied from interface:I_CmsGlobalConfigurationCacheRemoves a resource from the cache.- Specified by:
removein interfaceI_CmsGlobalConfigurationCache- Parameters:
resource- the resource to remove- See Also:
-
update
Description copied from interface:I_CmsGlobalConfigurationCacheUpdates the cache entry for the given published resource.NOTE: Cache implementations should not directly read the updated resource in this method because it might interfere with other caches. Instead, the resource should be marked as updated and read the next time the cache is queried.
- Specified by:
updatein interfaceI_CmsGlobalConfigurationCache- Parameters:
pubRes- a published resource- See Also:
-
update
Description copied from interface:I_CmsGlobalConfigurationCacheUpdates the cache entry for the given resource.NOTE: Cache implementations should not directly read the updated resource in this method because it might interfere with other caches. Instead, the resource should be marked as updated and read the next time the cache is queried.
- Specified by:
updatein interfaceI_CmsGlobalConfigurationCache- Parameters:
resource- the resource for which the cache entry should be updated- See Also:
-
waitForUpdate
Waits until the cache is potentially updated for the next time.This does include updates where there is actually nothing to update.
-