Classes/Eel/ElasticSearchQueryBuilder.php
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();
    }
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();
    }
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 ( ) ; }
This method will get the minimum of all allowed cache lifetimes for the
nodes that would result from the current defined query. This means it will evaluate to the nearest future value of the
hiddenBeforeDateTime or hiddenAfterDateTime properties of all nodes in the result.

@return int
@throws QueryBuildingException
@throws \Flowpack\ElasticSearch\Exception
This method will get the minimum of all allowed cache lifetimes for the nodes that would result from the current defined query . This means it will evaluate to the nearest future value of the hiddenBeforeDateTime or hiddenAfterDateTime properties of all nodes in the result .