Method getValue() from yii\caching\Cache abstract class returns false if the specified key doesn’t exist in cache,
so for example, if you store “false” value under some key, you’ll get false no matter if the value exists or not,
furthermore exists() method will give false even if the key exists in cache but value equals false.
this seems to be the wrong approach and probably better to return null or throw dedicated Exception to avoid surprises
Is there any reason why false for not existing cache keys should be kept?
/** * Retrieves a value from cache with a specified key. * This method should be implemented by child classes to retrieve the data * from specific cache storage. * @param string $key a unique key identifying the cached value * @return mixed|false the value stored in cache, false if the value is not in the cache or expired. Most often * value is a string. If you have disabled [[serializer]], it could be something else. */ abstract protected function getValue($key);