public function cacheLifetime(): int
    {
        $minTimestamps = array_filter([
            $this->getNearestFutureDate('_hiddenBeforeDateTime'),
            $this->getNearestFutureDate('_hiddenAfterDateTime')
        ], function ($value) {
            return $value != 0;
        });

        if (empty($minTimestamps)) {
            return 0;
        }

        $minTimestamp = min($minTimestamps);

        return $minTimestamp - $this->now->getTimestamp();
    }