#63719 closed enhancement (fixed)
Use site transients for caching RSS Feeds
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.9 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Feeds | Keywords: | has-patch |
| Focuses: | multisite, performance | Cc: |
Description
WP_Feed_Cache_Transient currently uses standard transients for the storing of feed caches, ie get_transient() and set_transient().
The performance of feed caches on Multisite Installs of WordPress could be improved by switching this to using site transients, ie get_site_transient() and set_site_transient().
This will allow sub-sites of a Multisite install to share the cache of RSS feeds included on the site.
Change History (8)
This ticket was mentioned in PR #9281 on WordPress/wordpress-develop by @peterwilsoncc.
4 months ago
#1
- Keywords has-patch added
#4
@
4 months ago
- Milestone changed from Awaiting Review to 6.9
With @spacedmonkey's approval on the linked pull request, I'm moving this to the 6.9 milestone.
Changes in the PR:
*_transient()calls replaced with*_site_transient()- Class level
@sincetag noting the use of the global cache on MS.
#5
follow-up:
↓ 6
@
4 months ago
Switching to site transients for WP_Feed_Cache_Transient makes a lot of sense, especially on multisite where every subsite currently ends up fetching the same feeds separately, so sharing the cache network-wide should definitely cut down on duplicate requests and improve performance.
Q> Would it be possible to add explicit unit tests to confirm the transient keys are stored in wp_options for single site and in wp_sitemeta for multisite?
#6
in reply to:
↑ 5
@
4 months ago
Replying to rollybueno:
Q> Would it be possible to add explicit unit tests to confirm the transient keys are stored in
wp_optionsfor single site and inwp_sitemetafor multisite?
I think that would be helpful in tests/phpunit/tests/option/siteTransient.php but I would do so against the Test tool and unit test improvements ticket (#63167 for WP 6.9) rather than this one. That will allow for a simpler and more focused test suite than using the transients created by fetching feeds. I can assist a review if you want to give it a go.
#7
@
4 months ago
- Owner set to peterwilsoncc
- Resolution set to fixed
- Status changed from new to closed
In 60524:
Modifies the RSS cache to use site transients so the feeds are cached globally on multisite installs.
No tests until the ticket fixing feed caching is merged.
Trac ticket: https://core.trac.wordpress.org/ticket/63719