Package org.apache.wicket.markup
Interface IMarkupCache
-
- All Known Implementing Classes:
MarkupCache
public interface IMarkupCacheEach Wicket application has a single IMarkupCache associated with it (seeMarkupSettings). ViaMarkupFactorythe markup cache is used by every Component to get its associated markup stream.- Author:
- Juergen Donnerstag
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Clear markup cache and force reload of all markup dataMarkupgetMarkup(MarkupContainer container, Class<?> clazz, boolean enforceReload)Gets any (immutable) markup resource for the container or any of its parent classes (markup inheritance)IMarkupFragmentremoveMarkup(String cacheKey)Remove the markup associated with the cache key from the cache including all dependent markups (markup inheritance)voidshutdown()Will be called by the application while shutting down.intsize()
-
-
-
Method Detail
-
clear
void clear()
Clear markup cache and force reload of all markup data
-
getMarkup
Markup getMarkup(MarkupContainer container, Class<?> clazz, boolean enforceReload)
Gets any (immutable) markup resource for the container or any of its parent classes (markup inheritance)- Parameters:
container- The original requesting markup containerclazz- The class to get the associated markup for. If null, the container's class is used, but it can be a parent class of the container as well (markup inheritance)enforceReload- The cache will be ignored and all, including inherited markup files, will be reloaded. Whatever is in the cache, it will be ignored- Returns:
- Markup resource
-
removeMarkup
IMarkupFragment removeMarkup(String cacheKey)
Remove the markup associated with the cache key from the cache including all dependent markups (markup inheritance)- Parameters:
cacheKey-- Returns:
- The markup removed from the cache. Null, if nothing was found.
- See Also:
MarkupResourceStream.getCacheKey()
-
size
int size()
- Returns:
- the number of elements currently in the cache.
-
shutdown
void shutdown()
Will be called by the application while shutting down. It allows the markup cache to cleanup if necessary.
-
-