Currently, when a developer uses Spring'sCache Abstraction with Apache Geode as the "caching provider", to enable caching in his/her @Service components, if the developer includes a @Service method to evict all entries, like so...
logger.info("Wiped all Caches");
SDG's current implementation of Cache.clear() will fail with an UnsupportedOperationException on a PARTITIONRegion. This is because Map.clear() is not supported on PARTITIONRegions.
Additionally, clear() would not work if the Region is a client Region.
This JIRA was created to add more intelligence to SDG's GemfireCache.clear() operation
A nice alternative would be for Apache Geode to include support for Map.clear() on PARTITIONRegions, just like for REPLICATERegions. Effectively, [o.a.g.c.Region.clear()](https://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/Region.html#clear--) could just call [o.a.g.c.Region.removeAll()](https://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/Region.html#removeAll-java.util.Collection-) when the Region is PARTITION