Add persistent object cache #48

Open
opened 2025-12-14 22:23:38 +00:00 by dwaxweiler · 6 comments

It would be nice to have a persistent object cache like redis and a fitting plugin like Redis Object Cache integrated into this recipe.

It would be nice to have a persistent object cache like redis and a fitting plugin like _Redis Object Cache_ integrated into this recipe.
Owner

Hmm do we we need a redis cache per app? I've seen people share one redis instances across many sites. I'm not sure of the implications of doing this either way in terms of security and performance overhead!

Hmm do we we need a redis cache per app? I've seen people share one redis instances across many sites. I'm not sure of the implications of doing this either way in terms of security and performance overhead!
Author

@kawaiipunk you are right; There would be an overhead if each app comes with their own Redis instance! Unfortunately, there is no Redis recipe yet. :(

@kawaiipunk you are right; There would be an overhead if each app comes with their own Redis instance! Unfortunately, there is no Redis recipe yet. :(
Owner

Hmm do we we need a redis cache per app? I've seen people share one redis instances across many sites. I'm not sure of the implications of doing this either way in terms of security and performance overhead!

So far the default across Co-op Cloud recipes is to have one instance per app – the per-app overhead seems less bad than the set-up complexity, and resolving difficulties around version compatibility between apps.

I believe @amras has been working on some patches to make it possible to point to a shared database server, maybe they have some thoughts on how to standardise this for other services including Redis?

> Hmm do we we need a redis cache per app? I've seen people share one redis instances across many sites. I'm not sure of the implications of doing this either way in terms of security and performance overhead! So far the default across Co-op Cloud recipes is to have one instance per app – the per-app overhead seems less bad than the set-up complexity, and resolving difficulties around version compatibility between apps. I believe @amras has been working on some patches to make it possible to point to a shared database server, maybe they have some thoughts on how to standardise this for other services including Redis?
Owner

I believe @amras has been working on some patches to make it possible to point to a shared database server, maybe they have some thoughts on how to standardise this for other services including Redis?

Don't know I can be of much help here.

The database idea came up because a lot of (upstream) services have databases configurable through environment variables, e.g. WORDPRESS_DB_HOST. Can't comment how often object cache addresses are configurable.

I agree with @3wordchant that per-app should be the default, though the redis container might need to be in a separate compose file so it can be disabled.

My bigger worry is with the plugin @dwaxweiler mentioned; would that require changing the app/wordpress image?

> I believe @amras has been working on some patches to make it possible to point to a shared database server, maybe they have some thoughts on how to standardise this for other services including Redis? Don't know I can be of much help here. The database idea came up because a lot of (upstream) services have databases configurable through environment variables, e.g. `WORDPRESS_DB_HOST`. Can't comment how often object cache addresses are configurable. I agree with @3wordchant that per-app should be the default, though the redis container might need to be in a separate compose file so it can be disabled. My bigger worry is with the plugin @dwaxweiler mentioned; would that require changing the app/wordpress image?
Owner

Can't comment how often object cache addresses are configurable.

Every app I have seen that uses Redis has REDIS_URL or something, but I don't think I have yet seen a single recipe where it's configurable by Operators.

Don't know I can be of much help here.

Do you have any thoughts on a naming convention for this "pointing at a shared service" task? compose.external-db.yml? compose.shared-db.yml? Or compose.external/shared-mariadb.yml? Something else? It seems like it could be nice if the same naming convention between databases and key-value stores for this.

My bigger worry is with the plugin dwaxweiler mentioned; would that require changing the app/wordpress image?

Indeed, we would need to add something to the recipe to support pre-installing apps — maybe using wp, or composer?

> Can't comment how often object cache addresses are configurable. Every app I have seen that uses Redis has `REDIS_URL` or something, but I don't think I have yet seen a single recipe where it's configurable by Operators. > Don't know I can be of much help here. Do you have any thoughts on a naming convention for this "pointing at a shared service" task? `compose.external-db.yml`? `compose.shared-db.yml`? Or `compose.external/shared-mariadb.yml`? Something else? It seems like it could be nice if the same naming convention between databases and key-value stores for this. > My bigger worry is with the plugin dwaxweiler mentioned; would that require changing the app/wordpress image? Indeed, we would need to add something to the recipe to support pre-installing apps — maybe using `wp`, or `composer`?
Owner

I'm already working on the on the pre-installed plug-ins issue: #70

Adding a per-wp-app redis container sounds like a good idea to me. Some sites need it, some don't so makes sense to do it this way.

I'm already working on the on the pre-installed plug-ins issue: https://git.coopcloud.tech/coop-cloud/wordpress/pulls/70 Adding a per-wp-app redis container sounds like a good idea to me. Some sites need it, some don't so makes sense to do it this way.
Sign in to join this conversation.
No Label
4 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coop-cloud/wordpress#48
No description provided.