Home > OS >  Infinispan - is there no option to delete a cache?
Infinispan - is there no option to delete a cache?

Time:11-20

Sorry, if this question is way too simple, but I am searching the docs for two days but I am not able to find a method that can delete a complete cache. (not just the key-value pairs, but the cache also).
I am working in spring boot and infinispan, so if anyone has any idea regarding this, please share.
EDIT: Please tell me a method in java/spring over hot rod. (Remote Cache Manager)

CodePudding user response:

Kindly look here: https://infinispan.org/docs/dev/titles/cli/cli.html

According to it, you can clear an entire cache via the following command type:

[//containers/default]> clearcache mycache

You can also drop a cache via

[//containers/default]> drop cache mycache

CodePudding user response:

The RemoteCacheManager's administration API has a removeCache() method:

remoteCacheManager.administration().removeCache(cacheName);

https://docs.jboss.org/infinispan/13.0/apidocs/org/infinispan/client/hotrod/RemoteCacheManagerAdmin.html#removeCache(java.lang.String)

  • Related