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

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

Introduction

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

Prototype

public final ICache<String, Markup> getMarkupCache() 

Source Link

Document

Get a unmodifiable map which contains the cached data.

Usage

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

License:Open Source License

/**
 * Flush markup cache for reports page// ww w.  j  ava  2  s .c o  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);
        }
    }
}