Obtain references to cache instances
Once configuration file is read you can obtain reference to the default cache instance. Â Â CacheManager manager = new DefaultCacheManager("my-config-file.xml"); Cache defaultCache = manager.getCache(); Â Â or any other named instance specified in "my-config-file.xml". Â Cache someNamedCache = manager.getCache("someNamedCache"); Â Â Every time you define element in XML configuration file, in addition to cache element, you are effectively configuring additional caches whose settings are inheriting and/or overriding the default cache.