Changes between Initial Version and Version 5 of Ticket #59738
- Timestamp:
- 10/27/2023 01:09:25 AM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #59738
- Property Owner set to flixos90
-
Property
Status
changed from
newtoreviewing -
Property
Summary
changed from
`wp_load_options()` makes DB queries for known non-existent options (notoptions).to`wp_prime_option_caches()` makes DB queries for known non-existent options (notoptions). -
Property
Milestone
changed from
Awaiting Reviewto6.4
-
Ticket #59738 – Description
initial v5 1 The function `wp_ load_options()` is intended to reduce the number of database queries by allowing the caching of options in bulk.1 The function `wp_prime_option_caches()` is intended to reduce the number of database queries by allowing the caching of options in bulk. 2 2 3 3 When determining which options to query for, it doesn't check the `notoptions` cache so re-queries the database for options that are known not to exist. … … 11 11 $initial_num_queries = get_num_queries(); 12 12 => int(10) ### Will differ depending on set up 13 wp> wp_ load_options( array( 'nonexistent_option' ) );13 wp> wp_prime_option_caches( array( 'nonexistent_option' ) ); 14 14 => NULL 15 15 wp> get_num_queries() - $initial_num_queries;