I'm having an argument with my chief architect about caching null-values. His opinion is, that null-values by definition aren't cached.
My problem now is, that there is always a cache-miss and a piece of code is always entered without any need, since the null value is totally fine in my case.
My question: Is there an official definition on this case?
I doubt there is an official document for this case as the answer strongly depends on your usage. For instance imagine you have a web query taking 200 ms to be processed that returns null and that is a valid value. Of course you would cache this to avoid these extra 200 ms everytime you do the query.
I am personally with you on the case. Rules saying never do... are rarely without an exception.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With