public JSONObject flushCache(HttpSession session, JSONObject json) {
if (json.has("cache") && !"".equals(json.getString("cache"))) {
String cacheName = json.getString("cache");
Cache cache = cacheManager.getCache(cacheName);
if (cache != null) {
cache.removeAll();
log.info("Cache '"+cacheName+"' flushed!");
}
else {
return JSONUtils.SimpleJSONError("No such cache: " + cacheName);
}