public function cache($query, array $params = null, $timeout = null)
    {
        $options = array_merge($this->cacheOptions, [
            "sql"     =>  $this,
            "query"   =>  $query,
            "params"  =>  $params,
        ]);

        if ($timeout) {
            $options["timeout"] = $timeout;
        }

        return new Cache($options);
    }
public function cache($query, array $params = null, $timeout = null)
    {
        $options = array_merge($this->cacheOptions, [
            "sql"     =>  $this,
            "query"   =>  $query,
            "params"  =>  $params,
        ]);

        if ($timeout) {
            $options["timeout"] = $timeout;
        }

        return new Cache($options);
    }
public function cache ( $ query , array $ params = null , $ timeout = null ) { $ options = array_merge ( $ this -> cacheOptions , [ "sql" => $ this , "query" => $ query , "params" => $ params , ] ) ; if ( $ timeout ) { $ options [ "timeout" ] = $ timeout ; } return new Cache ( $ options ) ; }
Convienience method to create a cached query instance
Convienience method to create a cached query instance