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

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

Introduction

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

Prototype

public static IMarkupCache get() 

Source Link

Document

A convenient helper to get the markup cache registered with the application.

Usage

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

License:Open Source License

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