Redis Cache (Local Redis & Cache)


#1

Can someone explain the difference between:

--with-local-redis

…and…

--cache

When --with-local-redis is selected, the post setup info doesn’t identify that any cache exists.


#2

EE v4 has concept of global services and local services.

We need to improve our docs to answer this, but for time being this may make sense:

For Redis - EE uses Global Redis as default.
If for some reason, you want to have a dedicated container for a site, you can pass --with-local-redis flag. The flag makes sure your site gets a local redis container attached to it.

--cache is a separate flag which turns on WordPress object-caching and full-page caching backed by Redis for WordPress sites only.

If you want to cache with the global redis container, just pass --cache.

If you want to cache with a local redis container, pass both flags --cache --with-local-redis.


#3

Ok…

So when I pass both --cache and --with-local-redis flag, I get:

**Warning:** There was some error in docker-compose up.
**Warning:** Initiating clean-up.
[rjwac.com] site root removed.
Site rjwac.com deleted.

#4

Interesting. But what is the purpose, or even better, what is recommended and why?
Why would someone want local container?


#5

From this post I can understand things about Global or Local (per site) containers:

But, I still don’t understand what happens with Global database if I clear cache from one of my websites (admin backend): will the cache be cleared for all websites?