Opened 5 months ago
Last modified 5 months ago
#62588 new defect (bug)
fetch_feed caching broken in WP 6.7
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.7 |
Component: | Feeds | Keywords: | needs-testing-info |
Focuses: | performance | Cc: |
Description
This is a follow-up to #55604.
Feed caching appears to be broken after WP6.7 was updated to SimplePie 1.8.0. I believe the issue is with SimplePie as there is a fix merged (but not yet released): https://github.com/simplepie/simplepie/pull/883/files
Change History (4)
This ticket was mentioned in Slack in #core-test by oglekler. View the logs.
5 months ago
#3
@
5 months ago
If I run the following code in WP 6.7.1
<?php add_filter('wp_feed_cache_transient_lifetime', function() { return 600; }); add_action('init', function () { $feed_url = 'https://news.un.org/feed/subscribe/en/news/all/rss.xml'; $feed = fetch_feed($feed_url); });
I see an HTTP API request in Query monitor on every load, as well as the transient being updated:
When I run the same code in WP 6.6.2 I see the initial request:
And as expected, I do not see any HTTP API requests on subsequent loads for 10 minutes:
#4
@
5 months ago
- Focuses performance added
- Version changed from 6.7.1 to 6.7
Reviewing the upstream ticket SimplePie#830, it doesn't appear that the fix is intended to be included in a 1.8 minor release, it's currently on the 1.9.0 milestone and tracking issue.
It might be worth backporting the upstream fix prior to the release of 1.9.0, although that's risky as it may be missed as we update SimplePie 1.8.x versions.
Hi @kaygee79 thank you for the report.
Can you, please, describe the symptoms of the broken caching and how to test that is now working anymore?
We need to reproduce the issue to work on the solution to fix it.
Thank you!