Cache: better fix for #5860 introduced in #5863

Cache: better fix for #5860 introduced in #5863
There is a logic change here: is there a test differentiating `false` and `null`?