Skip to content

Rename constants to PROMPRESS_REDIS_*#14

Open
gassan wants to merge 1 commit intoPeterBooker:mainfrom
TeDo-Verlag:changing-constants-prefix
Open

Rename constants to PROMPRESS_REDIS_*#14
gassan wants to merge 1 commit intoPeterBooker:mainfrom
TeDo-Verlag:changing-constants-prefix

Conversation

@gassan
Copy link
Copy Markdown
Contributor

@gassan gassan commented Nov 8, 2025

I’m using the redis-cache plugin, which already puts a heavy load on the Redis server. So it makes sense to create a second server on another port. Unfortunately, redis-cache uses the same WP_REDIS_* constants, which is very inconvenient.
I understand that this commit breaks backward compatibility, but it wouldn’t hurt to merge it at some point.

@PeterBooker
Copy link
Copy Markdown
Owner

Interesting, I had not considered this. Perhaps we could rely on PROMPRESS_REDIS_* but these fallback to WP_REDIS_* if not defined? Which would avoid breaking backward compatibility but allow choosing a different Redis server?

@gassan
Copy link
Copy Markdown
Contributor Author

gassan commented Nov 9, 2025

Good idea, force-pushed.

@gassan gassan force-pushed the changing-constants-prefix branch from 7c95dc6 to fae0c5f Compare November 9, 2025 15:37
@PeterBooker
Copy link
Copy Markdown
Owner

I just tested this and it does not allow overriding the WP_REDIS_* env vars, but while doing that I realized that there is already a filter prompress_redis_options which allows overriding these settings. Is there a problem using the filter to achieve what you want?

I am not sure it is valuable to add multiple ways of doing the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants