Load annotation cache strategy

@param CacheInterface $cache
@return CacheInterface
964976
public static function cache(CacheInterface $cache = null)
	{
		if($cache) {
			static::$cache = $cache;
		}
		elseif(!static::$cache) {
			static::$cache = new Annotation\EphemeralCache;
		}

		return static::$cache;
	}
137102
public function withVerifierCache($cache): self
    {
        if (!is_a($cache, $expected = 'Psr\SimpleCache\CacheInterface')) {
            throw new InvalidArgumentException('The verififier cache must be an instance of '.$expected);
        }

        $factory = clone $this;
        $factory->verifierCache = $cache;

        return $factory;
    }
890536
protected function loadInits(PackageInterface $package)
    {
        if (!$package->getInits()) {
            return $this;
        }

        $initLoader = \Parable\DI\Container::create(\Parable\Framework\Loader\InitLoader::class);
        $initLoader->load($package->getInits());
        return $this;
    }
138880
private function initAdmingeneratorClassLoader(ContainerInterface $container)
    {
        if (!$this->classLoaderInitialized) {
            $this->classLoaderInitialized = true;

            $AdmingeneratedClassLoader = new AdmingeneratedClassLoader();
            $AdmingeneratedClassLoader->setBasePath($container->getParameter('kernel.cache_dir'));
            $AdmingeneratedClassLoader->register();
        }
    }
741031
public function register(AnnotationRegistryConfigurationInterface $annotationRegistry)
    {

        // initialize the composer class loader
        $classLoader = new ClassLoader();
        $classLoader->addPsr4(
            $annotationRegistry->getNamespace(),
            $annotationRegistry->getDirectoriesAsArray()
        );

        // register the class loader to load annotations
        AnnotationRegistry::registerLoader(array($classLoader, 'loadClass'));
    }
1014920
public function addCache(CacheInterface $cache, $priority = 0)
    {
        $this->caches[spl_object_hash($cache)] = array(
            'cache' => $cache,
            'priority' => $priority
        );

        $this->sortedCaches = null;
    }
666056
public function registerCacheDriver(CacheStorage $cache)
    {
        // set cache
        $this->cache = $cache;

        // unregister the old autoloader
        spl_autoload_unregister([
                self::$instance,
                'getClass'
            ]);

        // prepend the new cache autoloader
        spl_autoload_register([
            self::$instance,
            'getClassFromCache'
        ], true, true);
    }
276629
public function Caching($Caching = NULL) {
      if (!is_null($Caching))
         $this->UseCaching = (bool)$Caching;
      return $this->UseCaching;
   }
218055
public function setCache(Store $cache)
    {
        if (method_exists($cache, 'tags')) {
            $cache = $cache->tags($this->tag());
        }

        $this->cache = $cache;

        return $this;
    }
897008
public function load(CachedCollectionInterface $routes)
    {
        if (!is_file($file = $this->getFilePath($routes)) || filemtime($file) < $routes->getTimestamp()) {
            $this->dumpMap($routes, $file);
        }

        return $this->loadMap($file);
    }
276459
protected function getCacheKey(RequestInterface $request)
    {
        // Allow cache.key_filter to trim down the URL cache key by removing generate query string values (e.g. auth)
        if ($filter = $request->getParams()->get('cache.key_filter')) {
            $url = $request->getUrl(true);
            foreach (explode(',', $filter) as $remove) {
                $url->getQuery()->remove(trim($remove));
            }
        } else {
            $url = $request->getUrl();
        }

        return $this->keyPrefix . md5($request->getMethod() . ' ' . $url);
    }
516162
public static function setCacheDriver(Cache $cache = null, $namespace = null)
    {
        self::setCache(self::$cacheDriver, $cache, $namespace);
    }
775261
public function setCache(FrontendInterface $cache)
    {
        parent::setCache($cache);

        $pathHash = substr(md5($this->environmentConfiguration->getApplicationIdentifier() . $cache->getIdentifier()), 0, 12);
        $this->identifierPrefix = 'Flow_' . $pathHash . '_';
    }
66050
public static function cache(Repository $cache = null)
    {
        if (! $cache) {
            $filestore = new FileStore(new Filesystem(), storage_path());
            $cache = new Repository($filestore);
        }

        return new CacheMiddleware(
            new PrivateCacheStrategy(
                new LaravelCacheStorage($cache)
            )
        );
    }
179569
public function cache(Store $cache = null)
    {
        $cache = $cache ?: $this->resolve(CacheRepository::class)->getStore();

        if ($this->usesCachedClipboard()) {
            $this->guard->getClipboard()->setCache($cache);

            return $this;
        }

        return $this->setClipboard(new CachedClipboard($cache));
    }
102730
public function getCache(string $storage = 'default'): CacheInterface
    {
        if (!isset($this->cache[$storage])) {
            if ($storage === 'default') {
                if (!isset($this->implicit['cache'])) {
                    throw new \RuntimeException('The default cache storage was not set');
                }
                $this->cache[$storage] = $this->implicit['cache'];
            } else {
                $this->cache[$storage] = $this->getCollector()->getCacheDriver($storage);
            }
        }

        return $this->cache[$storage];
    }
983338
protected function getLoader(): LoaderInterface
    {
        if (! $this->loader instanceof LoaderInterface) {
            $this->loader = new CacheLoader(sprintf(
                '%s/%s.php',
                rtrim($this->getCacheLocation(), '/'),
                $this->getCacheFilename()
            ));
        }

        return $this->loader;
    }