public function createCachedConditionGenerator(ConditionGenerator $conditionGenerator, $ttl = 0): ConditionGenerator
    {
        if (null === $this->cacheDriver) {
            return $conditionGenerator;
        }

        return new CachedConditionGenerator($conditionGenerator, $this->cacheDriver, $ttl);
    }
public function createCachedConditionGenerator(ConditionGenerator $conditionGenerator, $ttl = 0): ConditionGenerator
    {
        if (null === $this->cacheDriver) {
            return $conditionGenerator;
        }

        return new CachedConditionGenerator($conditionGenerator, $this->cacheDriver, $ttl);
    }
public function createCachedConditionGenerator ( ConditionGenerator $ conditionGenerator , $ ttl = 0 ) : ConditionGenerator { if ( null === $ this -> cacheDriver ) { return $ conditionGenerator ; } return new CachedConditionGenerator ( $ conditionGenerator , $ this -> cacheDriver , $ ttl ) ; }
Creates a new CachedConditionGenerator instance for the given ConditionGenerator.

Note: When no cache driver was configured the original ConditionGenerator
is returned instead.

@param int|\DateInterval|null $ttl Optional. The TTL value of this item. If no value is sent and
the driver supports TTL then the library may set a default value
for it or let the driver take care of that.
Creates a new CachedConditionGenerator instance for the given ConditionGenerator .