protected function prepareTtl($ttl) { if ($ttl > self::MAX_TTL) { return time() + $ttl; // timestamp must be passed if higher than MAX_TTL } return $ttl; }