Bugfix/config sync content sync #193
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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_metaandget_post_metaare always returning a cached value. I can understand theget_post_meta, butupdate_post_metais a volatile action and shouldn't be cached here.To get around this, I can run
delete_post_meta, but then the originalWP_Queryis 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 runningwp_flush_cache(). However, this seems quite aggressive from my perspective.I also tried
wp_cache_deleteto 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.