[wp-trac] [WordPress Trac] #54221: _transient_dirsize_cache is set to autoload=yes and kills db performance if it grows (20MB in our case)

WordPress Trac noreply at wordpress.org
Tue Aug 29 15:02:24 UTC 2023


#54221: _transient_dirsize_cache is set to autoload=yes and kills db performance if
it grows (20MB in our case)
-------------------------------------+-------------------------------------
 Reporter:  archon810                |       Owner:  spacedmonkey
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  6.4
Component:  Database                 |     Version:  2.8
 Severity:  major                    |  Resolution:
 Keywords:  has-patch changes-       |     Focuses:  administration,
  requested                          |  performance
-------------------------------------+-------------------------------------

Comment (by spacedmonkey):

 Looking into this ticket more. I think we should do the following.

 At the moment, if you have using a persistent object cache, this change
 would be a regression, as the transient would expire after a year instead
 of forever. Let's do something like this

 {{{#!php
 $expiration = ( wp_using_ext_object_cache() || wp_installing() ) ? 0 : 10
 * YEAR_IN_SECONDS;
 }}}

 I also recommend upping cache time to 10 years, that is much longer.

 What do you think @nicomollet ?

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


More information about the wp-trac mailing list