Velocity (CTP3) – How do I know if a cache region is created?
In Velocity (CTP3) we can create, remove, and clean a cache region programmatically by calling the following methods:
But there is no method to indicate if a cache region is created or not; so if I create a region which has been created already, an exception is thrown with the error code DataCacheErrorCode.RegionAlreadyExsits.
So far the walkaround is remove the cache region before creating it:
But this is not a good approach; so I hope the Velocity team will add the feature in the next release to check if a cache region is created.