Answers for "You have a missing class import. Try importing this class: League\Flysystem\Cached\Storage\Memcached"

0

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
Posted by: Guest on October-10-2020
0

"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.
Posted by: Guest on June-23-2020

Code answers related to "You have a missing class import. Try importing this class: League\Flysystem\Cached\Storage\Memcached"

Browse Popular Code Answers by Language