Creating a new CachingManager will close the existing one to avoid resource leak.

It's reusing the same CachingProvider. There is the CLOSE_CACHING_PROVIDER operation, but according to JCache specification a provider is still functional even after calling provider.close() so it's safe.