How to use Acorn Cache with REDIS in Sage Theme

Hi, i have a problem with config redis cache in acorn.
I have default config and i try to use this:

$transient_name = '123';
Cache::store('redis')->put($transient_name);

And i have error: Next Illuminate\View\ViewException: Illuminate\Cache\RedisStore::__construct(): Argument #1 ($redis) must be of type Illuminate\Contracts\Redis\Factory, Redis given,

I use docker env (lando dev) with service redis with default port 6379.
I use only Sage theme, without bedrock.

Anyone can help me with step by step config?

Interesting! Does acorn use the WordPress caching facilities, or does it have to be configured separately? I use a plugin (WP Redis) for the sites that should use Redis (as an object cache).

Did you already run composer require illuminate/redis?

Ben, is there any documentation on what this package does, when it’s needed, or how to use it?

We’ve been getting some inexplicable redis behavior — objects not clearing after update, errors after purging cache, nothing I’ve been able to source.

It’s right.
I install “illuminate/redis”: “9.5” (for acorn 3) and works.
Now i will test it deeper.

1 Like