Make WordPress Core

Opened 7 weeks ago

Last modified 7 weeks ago

#59662 assigned defect (bug)

Clear block theme file caches when editing the theme in the Theme File Editor

Reported by: flixos90's profile flixos90 Owned by: flixos90's profile flixos90
Milestone: 6.5 Priority: normal
Severity: normal Version: 6.2
Component: Themes Keywords: needs-patch needs-unit-tests
Focuses: performance Cc:


As originally reported as part of Certain data from block theme files is being cached (either via object cache or transient, in different use-cases).

Any of these caches should be programmatically invalidated when editing the theme via the built-in Theme File Editor.

While for regular theme development the WP_DEVELOPMENT_MODE constant (with a value of "theme") should be used, it is not reasonable to expect end users of WordPress that exclusively make use of the Theme File Editor to know about that.

Whenever files of a theme are being edited via the Theme File Editor, any of these caches (introduced between WordPress 6.2 and 6.4 so far) should be invalidated / cleared.

Change History (2)

#1 @joemcgill
7 weeks ago

As of [56978], these caches will now only be persistent on environments using an object cache (e.g. Redis, Memcached) and will be cleared by a typical flush of the object cache. As we work on ways to extend this type of theme file caching for block themes (see: #59600), we will need to ensure editing these files via the Theme File Editor clears those caches.

#2 @flixos90
7 weeks ago

  • Owner set to flixos90
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.