$notoptions is an associate array. Key is a string and value is a boolean type.
Before WordPress Options API and Transients API try to retrieve a value for an key they check for this existence of the key in
$notoptions array and if then find the key in it then it indicates that the key was never created and is not present in MySQL options table or Object cache. But if they don’t find existence of the key in the
$notoptions array then they go ahead and look in
$alloptions array, MySQL options table or object cache according to logical configuration. And if they don’t find the required key there then they add the key in
$notoptions array so that next time if they try to fetch this key they know that it doesn’t exist.
$notoptions prevents multiple
$alloptions array checks, object cache queries or MySQL queries for non-existent keys.
$notoptions is stored in WordPress object cache. The key for
$notoptions array is “notoptions” and “options” group. You can anytime retrieve this array using the below code
Whenever Options API and Transients API add a new key they unset the key from
$notoptions array if the key exists.