src/MongoDB.php
protected function filter($key)
    {
        if (is_array($key)) {
            $key = ['$in' => $key];
        }

        return [
            '_id' => $key,
            '$or' => [
                ['ttl' => ['$gt' => new BSONUTCDateTime($this->currentTimestamp() * 1000)]],
                ['ttl' => null]
            ]
        ];
    }
protected function filter($key)
    {
        if (is_array($key)) {
            $key = ['$in' => $key];
        }

        return [
            '_id' => $key,
            '$or' => [
                ['ttl' => ['$gt' => new BSONUTCDateTime($this->currentTimestamp() * 1000)]],
                ['ttl' => null]
            ]
        ];
    }
protected function filter ( $ key ) { if ( is_array ( $ key ) ) { $ key = [ '$in' => $ key ] ; } return [ '_id' => $ key , '$or' => [ [ 'ttl' => [ '$gt' => new BSONUTCDateTime ( $ this -> currentTimestamp ( ) * 1000 ) ] ] , [ 'ttl' => null ] ] ] ; }
Get filter for key and ttl.

@param string|iterable $key
@return array
Get filter for key and ttl .