[wp-trac] [WordPress Trac] #16287: get_option() - store retrieved option in a global array?
WordPress Trac
wp-trac at lists.automattic.com
Tue Jan 18 17:29:29 UTC 2011
#16287: get_option() - store retrieved option in a global array?
----------------------------------+----------------------
Reporter: digitalnature | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Database | Version: 3.1
Severity: normal | Resolution: invalid
Keywords: get_option, database |
----------------------------------+----------------------
Comment (by scribu):
Replying to [comment:12 digitalnature]:
> ok, now I'm confused. garyc40 & westi said wp default cache is not
persistent, so it's wiped out on each load just like the globals.
Exactly.
Additionally, right when WP starts, all options are loaded into the cache
(a global, by default), so that when you call get_option() it doesn't
cause an extra query.
But, this doesn't work for options that don't exist or that have the
'autoload' flag off.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16287#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list