Example usage for org.apache.wicket.markup MarkupCache removeMarkup

List of usage examples for org.apache.wicket.markup MarkupCache removeMarkup

Introduction

In this page you can find the example usage for org.apache.wicket.markup MarkupCache removeMarkup.

Prototype

@Override
public final IMarkupFragment removeMarkup(final String cacheKey) 

Source Link

Document

Note that this method will be called from a "cleanup" thread which might not have a thread local application.

Usage

From source file:org.devgateway.toolkit.forms.util.MarkupCacheService.java

License:Open Source License

/**
 * Flush markup cache for reports page/*from   w w  w .j  a  v  a2  s.co m*/
 */
public final void flushMarkupCache() {
    final MarkupCache markupCacheClass = (MarkupCache) MarkupCache.get();
    final MarkupCache.ICache<String, Markup> markupCache = markupCacheClass.getMarkupCache();
    final Collection<String> keys = markupCache.getKeys();
    for (String key : keys) {
        // The key for reports markup cache contains the class name so it
        // should end in "ReportPage"
        if (key.startsWith(START_NAME_REPORT_KEY)) {
            markupCacheClass.removeMarkup(key);
        }
    }
}