#33628 closed enhancement (maybelater)
Improve caching on get_theme_mods function
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.1 |
Component: | Themes | Keywords: | |
Focuses: | performance | Cc: |
Description
Currently whenever the get_theme_mods function is called, it calls the also the get_options function twice. This means that whenever the get_theme_mod / set_theme_mod / remove_theme_mod , also makes a call to options table. This value is not cached in memory, so whenever get_theme_mod is called it will get the values from the db / object cache.
To improve performance, after the first time the function is called, theme mods should be stored as a global / static variable.
Attachments (2)
Change History (4)
Note: See
TracTickets for help on using
tickets.