```php
$lifetime = ($cache['lifetime'] > 0 && ! $this->regionsConfig->hasLifetime($cache['region']))
    ? $cache['lifetime']
    : $this->regionsConfig->getLifetime($cache['region']);
```