[wp-trac] [WordPress Trac] #59633: Ensure theme files caching mechanisms are filterable and caches can be manually cleared

WordPress Trac noreply at wordpress.org
Tue Oct 24 11:32:40 UTC 2023


#59633: Ensure theme files caching mechanisms are filterable and caches can be
manually cleared
-------------------------------------------------+-------------------------
 Reporter:  afercia                              |       Owner:  joemcgill
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.4
Component:  Themes                               |     Version:  trunk
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  fixed-major dev-reviewed has-patch   |     Focuses:
  commit                                         |  performance
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):

 * keywords:  fixed-major dev-reviewed => fixed-major dev-reviewed has-patch
     commit
 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 @joemcgill reached out to me before reopening this ticket to make me aware
 of this change being "the first place where persistent caching has been
 added for theme files". He had some ideas, such as replacing the transient
 or reverting the changes to continue in 6.5.

 While [56978] and its backport to 6.4 [56979] are significant code
 changes, there are valid reasons:

 * Provide the means to more easily clear the cache. Replaces the transient
 to use `WP_Object_Cache`. This should address the concerns raised by
 @afercia while also avoiding adding enhancements such as a filter during
 Beta/RC.

 * Guard for future BC concerns to allow future iteration in 6.5 and
 beyond. Relocates newly introduced global internal helper functions into
 `WP_Theme` class with private visibility.

 Replying to [comment:29 flixos90]:
 > Not using any cache group was a deliberate decision, because we
 shouldn't use the non persistent `themes` group for this cache, as
 otherwise the caching would be useless.
 >
 > For that reason, it was intentionally decided to go without a cache
 group for now, with the goal of revising the approach in 6.5. @joemcgill
 also explained that in the commit message for [56978]. I think we should
 close this ticket and focus on a more holistic solution in 6.5.

 As the design was intentional and work will continue in 6.5 (in a
 different ticket), reclosing this ticket for 6.4.

 Thank you everyone for addressing the concerns raised by @afercia while
 also minimizing the changes during RC. It's a solid compromise.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59633#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list