Among the cache storage engines, if a given $key does not exist, retrieve() returns different values depending on the storage engine. Some of them return true, some false, and some null.
Which return value should we standardize on? I noticed that many of the core PHP functions called by those classes return false on failure, so should we use that too?
OK you are right. It is better to standardize it on NULL if there is a cache miss. Because a boolean value can be a value stored and expected from the cache.
Among the cache storage engines, if a given
$key
does not exist,retrieve()
returns different values depending on the storage engine. Some of them returntrue
, somefalse
, and somenull
.Which return value should we standardize on? I noticed that many of the core PHP functions called by those classes return
false
on failure, so should we use that too?