[wp-trac] [WordPress Trac] #19967: Caching get_option(), set_option() and update_option()

WordPress Trac wp-trac at lists.automattic.com
Sat Feb 4 09:53:57 UTC 2012


#19967: Caching get_option(), set_option() and update_option()
-------------------------+-----------------------------
 Reporter:  egorpromo    |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:  3.3.1
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 I propose create caching for some wordpress function like get_option(),
 set_option() and update_option().
 May be it's better not to request data from wp_options base of mysql all
 time. Better way is request all data from wp_options table at once and
 save it in global variable. So when we use get_option() we don't request
 data from database but request data from php global variable. And when we
 save data using set_option() we save data in wp_options table and save it
 in global variable yet. Later if we will use get_option() in script we
 will not request to mysql.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19967>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list