Boolean clearCache( @PathParam( "key" ) String cacheKey )
throws ArchivaRestServiceException;
+ @Path( "clearAllCaches" )
+ @GET
+ @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
+ @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
+ Boolean clearAllCaches()
+ throws ArchivaRestServiceException;
+
+
}
cache.clear();
return Boolean.TRUE;
}
+
+ public Boolean clearAllCaches()
+ throws ArchivaRestServiceException
+ {
+ for ( Cache cache : caches.values() )
+ {
+ cache.clear();
+ }
+ return Boolean.TRUE;
+ }
}
system-status.caches.grid.header.key=Cache
system-status.caches.flushed=Cache {0} flushed.
system-status.caches.grid.header.size=Size
+system-status.caches.flushAll=Flush All Caches
+system-status.caches.all.flushed=All Caches flushed.
});
}
+ flushAllCaches=function(){
+ clearUserMessages();
+ $("#main-content #status_caches").html(smallSpinnerImg());
+ $.ajax("restServices/archivaServices/systemStatusService/clearAllCaches", {
+ type: "GET",
+ success: function(data){
+ displaySuccessMessage( $.i18n.prop("system-status.caches.all.flushed"));
+ displayCacheEntries();
+ }
+ });
+ }
+
displaySystemStatus=function(){
screenChange();
var mainContent=$("#main-content");
</script>
<script id="status_caches_tmpl" type="text/html">
+ <a href="#" class="btn btn-warning" onclick="flushAllCaches()">
+ ${$.i18n.prop('system-status.caches.flushAll')}
+ </a>
<table class="table table-condensed">
<thead>
<tr>