-
Notifications
You must be signed in to change notification settings - Fork 16
Description
When the "Publish to Apple News" plugin is active along with WPGraphQL Smart Cache, there's a LOT of unnecessary cache purges happening.
The cache invalidation strategy for WPGraphQL Smart Cache is to purge caches for nodes when that node, or meta of that node is updated, unless the meta has been specifically ignored, or starts with an underscore (the non-enforced, but common practice for making meta "private")
The "Publish to Apple News" plugin has code that updates user meta for the meta key "apple_news_notice" quite often, causing any query with that user to be purged. Since this meta key doesn't start with an underscore, it's tracked as an update to the user object, triggering a cache purge for that user node.
This means any query where that author was in the query response will be purged from the cache. Typically, this will mean any page/post written by that author will be purged when the apple news meta key is updated, which is happening quite often from what I can tell. This would lead to a lot of cache misses and an overwhelmed server on higher traffic sites.