Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rrdial
Copy link
Contributor

@rrdial rrdial commented Jul 19, 2023

We've been able to trace the issue to what I believe to be some aggressive caching options on certain Wordpress installs. Calls to update_post_meta and get_post_meta are always returning a cached value. I can understand the get_post_meta, but update_post_meta is a volatile action and shouldn't be cached here.

To get around this, I can run delete_post_meta, but then the original WP_Query is cached still so we keep processing the same posts over and over again (needlessly). The only way I've been able to get it to work properly, consistently is running wp_flush_cache(). However, this seems quite aggressive from my perspective.

I also tried wp_cache_delete to target the individual items, but since I'm not setting them into the cache, I can't reliably delete them from the cache.

Side note… one specific Wordpress installation does seem to be using a pretty old version of the Redis cache.

Original conversation happening in Slack.

@rrdial rrdial requested review from aprietof, dndred and iceone July 19, 2023 19:52
@rrdial rrdial self-assigned this Jul 19, 2023
@rrdial rrdial marked this pull request as ready for review July 21, 2023 01:46
@rrdial rrdial merged commit 6cb88e6 into master Jul 21, 2023
@rrdial rrdial deleted the bugfix/config-sync-content-sync branch July 21, 2023 01:52
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