Class 'Cache\Adapter\Filesystem\FilesystemCachePool' not found in laravel code example

Example 1: "Class 'League\\Flysystem\\Cached\\Storage\\AbstractCache' not found

It sounds like you're using wrong Cache class. If you actually want to
use Flysystem's cache, install the league/flysystem-cached-adapter package
as suggested in composer.json.

Example 2: You have a missing class import. Try importing this class: League\Flysystem\Cached\Storage\Memcached

use League\Flysystem\Filesystem;
use League\Flysystem\Adapter\Local as Adapter;
use League\Flysystem\Cached\CachedAdapter;
use League\Flysystem\Cached\Storage\Memcached as MemcachedStore;

$memcached = new Memcached;
$memcached->addServer('localhost', 11211);

$adapter = new CachedAdapter(
    new Adapter(__DIR__.'/path/to/root'),
    new MemcachedStore($memcached, 'storageKey', 300)
);
$filesystem = new Filesystem($adapter);
// Storage Key and expire time are optional

Tags:

Misc Example