protected function untilToLifetime($until)
    {
        if (!$until instanceof DateTime) {
            return self::CACHE_LIFETIME;
        }

        return $until->getTimestamp() - (new DateTime())->getTimestamp();
    }