Alex
0
Q:

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
0
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.
0

New to Communities?

Join the community