jbossas/jboss-as — pull request #3101 by Mogztter (2012-09-23 16:07:57+00:00)
Title: AS7-5612 Add "Clear Cache" operation on cache container and cache

I found useful having the ability to clear local cache (in-memory) without a server restart.
The clear operation calls the method #clear on the org.infinispan.Cache interface.

Here's the output with the jboss-cli.sh :
```
[standalone@localhost:9999 /] /subsystem=infinispan/cache-container=hibernate/local-cache=entity:read-operation-description(name=clear)
{
"outcome" => "success",
"result" => {
"operation-name" => "clear",
"description" => "Clear a local cache",
"read-only" => false
}
}
[standalone@localhost:9999 /] /subsystem=infinispan/cache-container=hibernate/local-cache=entity:clear
{"outcome" => "success"}
[standalone@localhost:9999 /] /subsystem=infinispan/cache-container=hibernate:read-operation-description(name=clear-caches)
{
"outcome" => "success",
"result" => {
"operation-name" => "clear-caches",
"description" => "Clear all the local caches of a cache container",
"read-only" => false
}
}
[standalone@localhost:9999 /] /subsystem=infinispan/cache-container=hibernate:clear-caches
{"outcome" => "success"}
```
I think it would be nice if we could add more runtime operations on cache and support clear on persistent/clustered caches.