/** * Clear the given cache. When cacheFactory is null, then the DefaultCacheFactory is cleared. * Useful for unit testing. * * @param cacheFactory * @since 1.1 */ public static void clearCache(ICacheFactory cacheFactory) { if (cacheFactory == null) { cacheFactory = DefaultCacheFactory.getInstance(); } cacheFactory.clear(); }
private static ICacheFactory getCacheFactory(ICacheFactory cacheFactory) { if (cacheFactory != null) return cacheFactory; return DefaultCacheFactory.getInstance(); }