protected function filterTtl(&$ttl): void
    {
        if ($ttl !== null) {
            if ($ttl instanceof \DateInterval) {
                $ttl = (int) $ttl->format('%s');
            }
            $ttl = (int) $ttl;
        }
    }