diff --git a/src/infrastructure/cache/PhutilAPCKeyValueCache.php b/src/infrastructure/cache/PhutilAPCKeyValueCache.php --- a/src/infrastructure/cache/PhutilAPCKeyValueCache.php +++ b/src/infrastructure/cache/PhutilAPCKeyValueCache.php @@ -44,6 +44,10 @@ $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.