Thread-safe opening/closing of caches from DefaultCacheFactory
- Use shared lock whenever a cache is being created/opened
- Use shared lock when cache is closed