[wp-trac] [WordPress Trac] #22844: random_seed transient is autoloaded with no reason

WordPress Trac noreply at wordpress.org
Wed Dec 12 09:00:37 UTC 2012


#22844: random_seed transient is autoloaded with no reason
--------------------------+------------------------------
 Reporter:  mark-k        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Performance   |     Version:  3.4.2
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by mark-k):

 <meta>
 #20316 was one of the things that actually drove me into this subject. My
 main motivation is to have a plugin which will profile the use of options
 and recommend which ones should be autoloaded and which don't, based on
 the actual usage pattern for the specific site.

 After reading the documentation and relevant code of the transients API I
 understand the motivation, but I don't think the result is consistent or
 easier to use then using options for the same purpose. For example, for
 better front end performance RSS feed should be fetched and cached in cron
 process where there is no advantage for using transients. Use of transiet
 API as it is for RSS fetching leads to slower front end from time to time
 when you use an RSS widget.

 But back to the actual issue
 </meta>

 I think it is hard to say when an option/transient should be auto-loaded,
 but most of the time it is easy to say when it should not. Based on the
 usage pattern of random_seed it should not. My criteria would be "whatever
 transient/option is not used in a function called from the usage of public
 WP API intended to be used by themes should not be auto-loaded by
 default", and with this criteria non of the site transients you mentioned
 should auto-load.

 I'm not a native english speaker but it seems to me that by the definition
 of the word in english [http://www.merriam-
 webster.com/dictionary/transient] it should not be used for objects which
 are expected to live indefinitely ;)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22844#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list