{
markupKeyCache.put(cacheKey, locationString);
return markup;
}
// Watch file in the future
final ModificationWatcher watcher = Application.get()
.getResourceSettings()
.getResourceWatcher(true);
if (watcher != null)
{
watcher.add(markupResourceStream, new IChangeListener()
{
public void onChange()
{
if (log.isDebugEnabled())
{
log.debug("Remove markup from cache: " + markupResourceStream);
}
// Remove the markup from the cache. It will be reloaded
// next time when the markup is requested.
watcher.remove(markupResourceStream);
removeMarkup(cacheKey);
}
});
}
}