You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generally, when get_option() is called and the option does not exist, WordPress will store the option in the 'notoptions' cache to avoid unnecessary DB requests on subsequent calls to the option. In https://core.trac.wordpress.org/changeset/56595 (shipped in WP 6.4), a change was made to check object cache (when present) before checking the 'notoptions' cache to avoid an unnecessary check of 'notoptions' when the option does exist, but this has been reported to cause an increase in requests to object caches when the option does not exist in https://core.trac.wordpress.org/ticket/62692 if the object cache implementation does not ensure that cache misses avoid redundant calls to the same non-existent option.
This comment, on the second ticket includes a list of implementations affected, including this one.
Even when this is fixed and shipped (hopefully in WP 6.8) people running versions of WP from 6.4–6.7 will still be affected by this bug unless it's handled at the object cache layer.
Reproduction steps
Call get_option( 'notexist' ) in a loop. Prior to 6.4, this would generate 2 total cache gets; after 6.4, it generates an infinite number, as each iteration of the cycle triggers a cache get which misses.
The text was updated successfully, but these errors were encountered:
Generally, when
get_option()
is called and the option does not exist, WordPress will store the option in the 'notoptions' cache to avoid unnecessary DB requests on subsequent calls to the option. In https://core.trac.wordpress.org/changeset/56595 (shipped in WP 6.4), a change was made to check object cache (when present) before checking the 'notoptions' cache to avoid an unnecessary check of 'notoptions' when the option does exist, but this has been reported to cause an increase in requests to object caches when the option does not exist in https://core.trac.wordpress.org/ticket/62692 if the object cache implementation does not ensure that cache misses avoid redundant calls to the same non-existent option.This comment, on the second ticket includes a list of implementations affected, including this one.
Even when this is fixed and shipped (hopefully in WP 6.8) people running versions of WP from 6.4–6.7 will still be affected by this bug unless it's handled at the object cache layer.
Reproduction steps
Call get_option( 'notexist' ) in a loop. Prior to 6.4, this would generate 2 total cache gets; after 6.4, it generates an infinite number, as each iteration of the cycle triggers a cache get which misses.
The text was updated successfully, but these errors were encountered: