#37517 closed defect (bug) (worksforme)
additional argument for GET_OPTION and UPDATE_OPTION
Reported by: | tazotodua | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Options, Meta APIs | Keywords: | |
Focuses: | Cc: |
Description
on my plugin/settings page, at first i get an option, then on the same request i might update that option.
but the option is cached, and updating is not reflected correctly.
for that, i think, there should be additional argument:
get_option(name, default, $get_fresh=false)
update_option(name,value, autoload, $get_fresh=false);
in case i set $get_fresh to true, it should overcome cache and make new request, not getting the cached values.
Change History (3)
Note: See
TracTickets for help on using
tickets.
This shouldn't be needed, as
update_option()
will update the cache thatget_option()
uses.However, there is a race condition that can cause that not to be so, for example #25623 which is getting fixed via #31245. That should only happen for people using cache dropins (such as Memcache or Redis) so shouldn't be affected.