Thread Starter
Marisa
(@marisa2023)
I am using the plugin Max Mega Menu. Its data will be entirely static. How do I make Redis cache this plugin? I think this will be a better target than the other two.
Thread Starter
Marisa
(@marisa2023)
I am seeing if performance can be improved by adding.
wp_cache_add_global_groups([
‘terms’,
‘term_relationships’,
‘term_meta’
]);
as I think these won’t be in the Redis cache.
it’s up to the authors of Max Mega Menu to leverage object caching in their code.
Redis Object Cache is just an API.
Thread Starter
Marisa
(@marisa2023)
Actually I found the source of the problem now. It isn’t anything to do with Max Mega Menu, PolyLang or LocoTranslate.
Quite a bit of WordPress and plugins will use groups terms, term_relationships and term_meta. I’ve already added them to the Redis Cache. The website still works.
But what do you think? By default the groups terms, term_relationsips and term_meta are not cached. If the underlying database rows are altered will this cause problems or will Redis Object Cache invalidate the keys and get fresh data.
-
This reply was modified 2 weeks, 2 days ago by
Marisa.
What do you mean these are not cached by default?
By default the groups terms, term_relationsips and term_meta are not cached.
Thread Starter
Marisa
(@marisa2023)
I am very new to Redis. I only installed it a couple of days ago. Is my understanding correct? If the underling database rows which map to the groups terms, term_relationships and term_meta are modified will the Redis Object Cache still return the correct results on the assumption the below code has been excecuted?
wp_cache_add_global_groups([
‘terms’,
‘term_relationships’,
‘term_meta’
]);
The global groups feature is only for WordPress Multisite Networks, are you sing those?
Thread Starter
Marisa
(@marisa2023)
No, I don’t have a WordPress Multisite.
What function call should I use to add the groups terms, term_relationships and term_meta?
Add the groups to what specifically?
You can see all configuration options outlined in the plugin’s README.