[wp-trac] [WordPress Trac] #57886: get_post_templates includes results of get_block_templates while caching (WP_Theme)
WordPress Trac
noreply at wordpress.org
Mon Jun 19 10:32:00 UTC 2023
#57886: get_post_templates includes results of get_block_templates while caching
(WP_Theme)
----------------------------------------+----------------------------------
Reporter: maniu | Owner: spacedmonkey
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.3
Component: Themes | Version: 5.9
Severity: minor | Resolution: fixed
Keywords: has-patch needs-unit-tests | Focuses: multisite,
| performance
----------------------------------------+----------------------------------
Changes (by spacedmonkey):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"55939" 55939]:
{{{
#!CommitTicketReference repository="" revision="55939"
Themes: Fix caching issue in get_post_templates method in `WP_Theme`.
Fix an edge case caching issue, where if a developer use the
`wp_cache_themes_persistently` filter and is running the site in multisite
configuration, it meant block template are incorrectly cached. Block
templates are stored in the posts table. But in a multisite configuration,
different sites on the multisite could have different block templates
stored in there post table. As themes cache group is a global group, it
resulted in incorrect values being cached.
Props maniu, spacedmonkey, hellofromTonya, oglekler, mukesh27, joemcgill.
Fixes #57886.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57886#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list