Closed 4n70w4 closed 4 years ago
Sorry, I don't know anything about Laravel. The error means the connector that's being used to import DailyForexRates
is not CachingConnector
, but some other class. If you want to cache responses from the HttpConnector
, you need to wrap the HttpConnector
with the CachingConnector
, so it would look like the following.
new CachingConnector(new HttpConnector);
I do not know how to do this with Laravel, but essentially you need to inject HttpConnector
inside CachingConnector
and then inject that CachingConnector
into EuropeanCentralBankProvider
. Unfortunately, it seems EuropeanCentralBankProvider
only supports HttpConnector
, though, so we would need to fix that!
This is fixed in EuropeanCentralBankProvider version 5.
How to enable CachingConnector in Laravel?
ScriptFUSION\Porter\Cache\CacheUnavailableException : Cannot cache: connector does not support caching.