[wp-trac] [WordPress Trac] #30380: get_transient doesn't check the return of get_option

WordPress Trac noreply at wordpress.org
Tue Nov 25 23:16:29 UTC 2014


#30380: get_transient doesn't check the return of get_option
-------------------------------------+------------------------------
 Reporter:  jamesgol                 |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Options, Meta APIs       |     Version:  2.8
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  performance
-------------------------------------+------------------------------

Comment (by voldemortensen):

 This patch worked for me. I created a faux plugin that called
 get_transient( 'randomstuff' ) and used the query monitor before and after
 the patch. The two delete_option calls were indeed eliminated. Saved about
 0.003 seconds.

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


More information about the wp-trac mailing list