public class ContentViewCache extends Object implements Serializable
Each content view instance will be cached if its cache key is not null. Each instance will be cached using the cache key so its state is restored. Also handles refresh of caches when receiving events configured on the content view.
Modifier and Type | Field and Description |
---|---|
static Integer |
DEFAULT_CACHE_SIZE
Default cache size, set to 5 instances per content view
|
Constructor and Description |
---|
ContentViewCache() |
Modifier and Type | Method and Description |
---|---|
void |
add(ContentView cView)
Add given content view to the cache, resolving its cache key and
initializing it with its cache size.
|
ContentView |
get(String name)
Returns cached content view with given name, or null if not found.
|
void |
refresh(String contentViewName,
boolean rewind)
Refresh page providers for content views in the cache with given
name.refreshEventToContentViewName
|
void |
refreshOnEvent(String eventName)
Refresh page providers for content views having declared given event as
a refresh event.
|
void |
reset(String contentViewName)
Resets all cached information for given content view.
|
void |
resetAll()
Resets all cached information for all content views, as well as
configuration caches (refresh and reset events linked to content views).
|
void |
resetAllContent()
Resets all cached information for all content views
|
void |
resetPageProvider(String contentViewName)
Resets page providers for content views in the cache with given name.
|
void |
resetPageProviderOnEvent(String eventName)
Resets page providers for content views having declared given event as a
reset event.
|
public static final Integer DEFAULT_CACHE_SIZE
public void add(ContentView cView)
public ContentView get(String name)
public void refresh(String contentViewName, boolean rewind)
Other contextual information set on the content view and the page provider will be kept.
public void resetPageProvider(String contentViewName)
Other contextual information set on the content view will be kept.
public void refreshOnEvent(String eventName)
Other contextual information set on the content view and the page provider will be kept.
public void resetPageProviderOnEvent(String eventName)
Other contextual information set on the content view will be kept.
public void reset(String contentViewName)
public void resetAllContent()
public void resetAll()
Copyright © 2011 Nuxeo SA. All Rights Reserved.