To accept for cleaning only not active cache dirs

@param caches set of active cache names, extracted with help of {@link #cacheToName()}

@return filter to accept only names not in set
435688
public static DirectoryStream.Filter<Path> notInCaches(Set<String> caches) {
        checkNotNull(caches, "set of active caches can't be null");
        return new NotInCachesFilter(caches);
    }
1119694
@Override
	public Result<Void> cacheClear(AuthzTrans trans, String cname,	String segments) {
		TimeTaken tt = trans.start(CACHE_CLEAR + cname + ", segments[" + segments + ']', Env.SUB|Env.ALWAYS);
		try {
			String[] segs = segments.split("\\s*,\\s*");
			int isegs[] = new int[segs.length];
			for(int i=0;i<segs.length;++i) {
				try {
					isegs[i] = Integer.parseInt(segs[i]);
				} catch(NumberFormatException nfe) {
					isegs[i] = -1;
				}
			}
			return service.cacheClear(trans,cname, isegs);
		} catch (Exception e) {
			trans.error().log(e,IN,CACHE_CLEAR);
			return Result.err(e);
		} finally {
			tt.done();
		}
	}
778900
public function clear($cache = null)
    {
        if (null !== $cache) {
            if (!array_key_exists($cache, $this->caches)) {
                throw new CacheNotFoundException($cache);
            }

            $this->caches[$cache]->clear();
        } else {
            foreach ($this->caches as $cache) {
                $cache->clear();
            }
        }
    }
761830
public ExternalInvalidation filterExternalCacheFragment(String cacheName, ExternalInvalidation externalCacheFragment) {
		InvalidationTableList invalidationTableList = getInvalidationTableList(cacheName);
		try {
			invalidationTableList.readWriteLock.readLock().lock();
			return internalFilterExternalCacheFragment(cacheName, invalidationTableList, externalCacheFragment);
		} finally {
			invalidationTableList.readWriteLock.readLock().unlock();
		}
	}
1338242
public static AdvancedCache ignoreReturnValuesCache(AdvancedCache cache) {
		return cache.withFlags( Flag.SKIP_CACHE_LOAD, Flag.SKIP_REMOTE_LOOKUP, Flag.IGNORE_RETURN_VALUES );
	}
1169539
public static cacheselector[] get_filtered(nitro_service service, String filter) throws Exception{
		cacheselector obj = new cacheselector();
		options option = new options();
		option.set_filter(filter);
		cacheselector[] response = (cacheselector[]) obj.getfiltered(service, option);
		return response;
	}
978485
public NetworkFilter names(String... names) {
        checkNotNull(names, "Name match criteria must be not a null");

        predicate = predicate.and(combine(
            NetworkMetadata::getName, in(asList(names), Predicates::containsIgnoreCase)
        ));

        return this;
    }
334812
private function _isCached() 
    {
        $filters = false;

        if ($this->cacheSettings) {
        
            if ($this->cache) {
                $filters = $this->cache->getCache();
            }
        }

        return $filters;
    }
894203
public Collection<ApplicableToProduct> getNonApplicableResourcesForName(String resourceName) {
        List<ApplicableToProduct> result = nameToNonApplicableResources.get(resourceName);

        if (result == null) {
            // We don't expect this to happen, if we're looking for non-applicable resources, it's because we failed to resolve it earlier
            cacheFeaturesForName(resourceName);
            result = nameToNonApplicableResources.get(resourceName);
        }

        if (result == null) {
            // Still null, very odd
            return Collections.emptySet();
        }

        return Collections.unmodifiableList(result);
    }
394631
public static synchronized <K, V> Cache<K, V> getDefaultCache(String cacheName) {
        if (defaultCacheManager == null) {
            defaultCacheManager = new DefaultCacheManager();
        }
        return defaultCacheManager.getCache(cacheName);
    }
761075
public CacheConfigurationBuilder<K, V> withResourcePools(ResourcePools resourcePools) {
    if (resourcePools == null) {
      throw new NullPointerException("Null resource pools");
    }
    CacheConfigurationBuilder<K, V> otherBuilder = new CacheConfigurationBuilder<>(this);
    otherBuilder.resourcePools = resourcePools;
    return otherBuilder;
  }
572007
protected void putIntoCache(List<HalResource<?>> notCachedResources) {
    Cache cache = getCache();
    for (HalResource<?> notCachedResource : notCachedResources) {
      cache.put(getResourceId(notCachedResource), notCachedResource);
    }
  }
1127187
public static cacheobject[] get_filtered(nitro_service service, String filter) throws Exception{
		cacheobject obj = new cacheobject();
		options option = new options();
		option.set_filter(filter);
		cacheobject[] response = (cacheobject[]) obj.getfiltered(service, option);
		return response;
	}
959617
public void refreshCache(String cacheName, List<String> excludedFormats) {
        CacheService cache = allCaches.get(cacheName);
        if (cache != null) {
            if (excludedFormats != null && cache instanceof ExcludableCache && excludedFormats.contains(((ExcludableCache)cache).getFormat())) {
                logger.debug(" - omitting cache " + cacheName);
            }
            else {
                logger.info(" - refresh cache " + cacheName);
                try {
                    cache.refreshCache();
                } catch (Exception e) {
                    logger.severeException("failed to refresh cache", e);
                }
            }
        }
    }
1182819
public List<File> getAutoAttachCacheFiles() {
        ArrayList<File> currentFiles = new ArrayList<File>(autoAttachCacheFiles);
        Collections.sort(currentFiles, new Comparator<File>() {
            @Override
            public int compare(File o1, File o2) {
                return o1.getName().compareTo(o2.getName());
            }
        });
        return Collections.unmodifiableList(currentFiles);
    }
1292376
public CmsUrlNameMappingFilter filterNamePattern(String namePattern) {

        if (namePattern == null) {
            throw new IllegalArgumentException();
        }
        CmsUrlNameMappingFilter result = new CmsUrlNameMappingFilter(this);
        result.m_namePattern = namePattern;
        return result;
    }
588810
@Override
    public Cache getCache(String cacheName) throws CacheException
    {
        if (this.cache == null)
        {
            this.cache = createCache(cacheName);
        }

        return this.cache;
    }