src/Titon/Db/Query.php
public function cache($key, $expires = null) {
        if ($this->getType() !== self::SELECT) {
            return $this;
        }

        $this->_cacheKey = $key;
        $this->_cacheLength = $expires;

        return $this;
    }
public function cache($key, $expires = null) {
        if ($this->getType() !== self::SELECT) {
            return $this;
        }

        $this->_cacheKey = $key;
        $this->_cacheLength = $expires;

        return $this;
    }
public function cache ( $ key , $ expires = null ) { if ( $ this -> getType ( ) !== self :: SELECT ) { return $ this ; } $ this -> _cacheKey = $ key ; $ this -> _cacheLength = $ expires ; return $ this ; }
Set the cache key and duration length.

@param mixed $key
@param mixed $expires
@return $this
Set the cache key and duration length .