I note there is a cache.psr6 container alias but if I use:
new Cache
As the instance, I get an error that getItems isn't available, which, I assume, means I am not passing a PSR-6 compliant cache instance. I'm using Redis if that changes the config in any way.
Is there an additional configuration to be done or am I passing this the wrong way?
The library I am using is: https://github.com/AlexaCRM/dynamics-webapi-toolkit/wiki/Tutorial
And the tutorial states:
You can optionally supply a PSR-6 compliant cache adapter.
$settings->cachePool = $cacheAdapter;
My question is, what is $cacheAdapter?
The adapter would be a
Psr16Adapterover a cache driver which is howcache.psr6is bound in the defaultCacheServiceProvider.If you have redis configured as your default cache driver you would only need to set your cache pool to
cache.psr6.However you may run into a
Class 'Symfony\Component\Cache\Adapter\Psr16Adapter' not founderror sincesymfony/cacheis only a dev dependency inlaravel/framework. You can resolve this by requiring it in your application.