@SuppressWarnings("unchecked")
    public static synchronized <T extends Cache> T createCache(String name) {
        T cache = (T) caches.get(name);
        if (cache != null) {
            return cache;
        }
        cache = (T) cacheFactoryStrategy.createCache(name);

        log.info("Created cache [" + cacheFactoryStrategy.getClass().getName() + "] for " + name);

        return wrapCache(cache, name);
    }
Returns the named cache, creating it as necessary.

@param name         the name of the cache to create.
@param <T> the type cache being created
@return the named cache, creating it as necessary.
xmppserver/src/main/java/org/jivesoftware/util/cache/CacheFactory.java