private Long doCacheAction(final FindCacheInfoCriteria criteria,
                               final Consumer<StroomCache<?, ?>> cacheAction) {
        final List<CacheInfo> caches = find(criteria);
        for (final CacheInfo cacheInfo : caches) {
            final String cacheName = cacheInfo.getName();
            final StroomCache<?, ?> cache = cacheManager.getCaches().get(cacheName);
            if (cache != null) {
                cacheAction.accept(cache);
            } else {
                LOGGER.error("Unable to find cache with name '" + cacheName + "'");
            }
        }
        return (long) caches.size();
    }
Clears all items from named cache and rebuilds the cache from config
stroom-cache/stroom-cache-service-impl/src/main/java/stroom/cache/service/impl/CacheManagerServiceImpl.java