use Symfony\Component\Cache\Adapter\FilesystemAdapter; $cache = new FilesystemAdapter(); $storage = $cache->getStorage(); // Now we can use the storage instance to interact with the cache
use Symfony\Component\Cache\Adapter\RedisAdapter; $redis = new Redis(); $redis->connect('127.0.0.1'); $cache = new RedisAdapter($redis); $storage = $cache->getStorage(); // Now we can use the storage instance to interact with the cacheIn both examples, we can use the storage instance to store and retrieve data from the cache. The package library used in these examples is the Symfony Cache Component.