forked from GithubBackups/vichan
RedisCacheDriver.php: add false value support
This commit is contained in:
parent
b224bfefdf
commit
a6399ed3b0
@ -29,10 +29,14 @@ class RedisCacheDriver implements CacheDriver {
|
|||||||
if ($ret === false) {
|
if ($ret === false) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
if ($ret === null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function set(string $key, mixed $value, mixed $expires = false): void {
|
public function set(string $key, mixed $value, mixed $expires = false): void {
|
||||||
|
$value = $value === false ? null : $value;
|
||||||
if ($expires === false) {
|
if ($expires === false) {
|
||||||
$this->inner->set($this->prefix . $key, $value);
|
$this->inner->set($this->prefix . $key, $value);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user