src/Search/Search.php
public function useResultCache(string $cacheKey = null, int $ttl = 0): self
    {
        if (null === $cacheKey) {
            $this->cacheProfile = null;
        } else {
            $this->cacheProfile = new SearchCacheProfile($cacheKey, $ttl);
        }

        return $this;
    }
public function useResultCache(string $cacheKey = null, int $ttl = 0): self
    {
        if (null === $cacheKey) {
            $this->cacheProfile = null;
        } else {
            $this->cacheProfile = new SearchCacheProfile($cacheKey, $ttl);
        }

        return $this;
    }
public function useResultCache ( string $ cacheKey = null , int $ ttl = 0 ) : self { if ( null === $ cacheKey ) { $ this -> cacheProfile = null ; } else { $ this -> cacheProfile = new SearchCacheProfile ( $ cacheKey , $ ttl ) ; } return $ this ; }
Instructs the executor to use a result cache.

@param string $cacheKey
@param int    $ttl

@return $this|self
Instructs the executor to use a result cache .