mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-09 00:12:41 +01:00
APC: Set ttl to 0 when ttl is not given
Summary: Passing null as a value for parameter $ttl is deprecated. Omitting the parameter is considered to be equivalent to 0. Bug: T15064 Test Plan: * Looked in the deprecation log and did not see a deprecation message from apc. Reviewers: O1 Blessed Committers, avivey Reviewed By: O1 Blessed Committers, avivey Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25833
This commit is contained in:
parent
d643ca4c4c
commit
74bf6c0e3c
1 changed files with 5 additions and 1 deletions
|
@ -38,12 +38,16 @@ final class PhutilAPCKeyValueCache extends PhutilKeyValueCache {
|
|||
return $results;
|
||||
}
|
||||
|
||||
public function setKeys(array $keys, $ttl = null) {
|
||||
public function setKeys(array $keys, $ttl = 0) {
|
||||
static $is_apcu;
|
||||
if ($is_apcu === null) {
|
||||
$is_apcu = self::isAPCu();
|
||||
}
|
||||
|
||||
if ($ttl === null) {
|
||||
$ttl = 0;
|
||||
}
|
||||
|
||||
// NOTE: Although modern APC supports passing an array to `apc_store()`,
|
||||
// it is not supported by older version of APC or by HPHP.
|
||||
|
||||
|
|
Loading…
Reference in a new issue