[wp-trac] [WordPress Trac] #59633: Ensure theme files caching mechanisms are filterable and caches can be manually cleared
WordPress Trac
noreply at wordpress.org
Thu Oct 19 14:12:48 UTC 2023
#59633: Ensure theme files caching mechanisms are filterable and caches can be
manually cleared
--------------------------+--------------------------
Reporter: afercia | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.4
Component: Themes | Version: trunk
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses: performance
--------------------------+--------------------------
Changes (by joemcgill):
* keywords: => 2nd-opinion
* type: enhancement => defect (bug)
* milestone: 6.5 => 6.4
Comment:
I tend to agree with @afercia that there are many legitimate use cases
when this new theme pattern cache can become stale and potentially lead to
errors, where they would not get cleared by one of the cache invalidation
methods that have been set in place, nor where using the
`WP_DEVELOPMENT_MODE` constant is appropriate. The Theme Editor is
one—quite legitimate—concern, but this also doesn't take into account
sites that have their themes in evergreen development, where incremental
updates are made and deployed via CI or any other automated method.
This is the first place where persistent caching has been added for theme
files (we previously added the `wp_core_block_css_files` transient for
core block styles in `register_core_block_style_handles`). There have been
other places in the past where file caching for themes/plugins has been
considered and reverted (e.g. [42242]).
I think we need to consider removing this transient, or pursuing one of
the options @afercia suggested during RC to ensure sites can opt-out of
this theme cache or clear it easily when changes are deployed. Moving back
to the 6.4 milestone for discussion.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59633#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list