Redis Cache (Local Redis & Cache)

Can someone explain the difference between:




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

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.

1 Like


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.
[] site root removed.
Site deleted.

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

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?

Is there an easy way to switch off cache for current site? Trough config file or somehow… ?

Similarly, is there a way to activate caching on for a given wp site that was not created with “–cache” directive originally