3 declare(strict_types=1);
12 use Psr\Cache\CacheItemPoolInterface;
13 use Psr\SimpleCache\CacheInterface;
14 use Symfony\Component\Cache\Adapter\FilesystemAdapter;
22 public static function validateCache($cache =
null)
24 if ($cache instanceof CacheItemPoolInterface || $cache instanceof CacheInterface) {
28 if (class_exists(
'Symfony\Component\Cache\Simple\FilesystemCache')) {
31 $cache = new \Symfony\Component\Cache\Simple\FilesystemCache(
'', 0, getcwd() .
"/cache");
35 $cache =
new FilesystemAdapter(
'', 0, getcwd() .
"/cache");