/** * @return the cache factory creating local caches. * @since 1.5M2. * @deprecated Since 1.7M1, use {@link CacheManager} component instead using {@link Utils#getComponent(Class)} */ @Deprecated public CacheFactory getLocalCacheFactory() { CacheFactory localCacheFactory; String localCacheHint = Param("xwiki.cache.cachefactory.local.hint", null); if (StringUtils.isEmpty(localCacheHint) || Utils.getComponent(CacheFactory.class, localCacheHint) == null) { CacheManager cacheManager = Utils.getComponent(CacheManager.class); try { localCacheFactory = cacheManager.getLocalCacheFactory(); } catch (ComponentLookupException e) { throw new RuntimeException("Failed to get local cache factory component", e); } } else { localCacheFactory = Utils.getComponent(CacheFactory.class, localCacheHint); } return localCacheFactory; }