Cake\Database\Query::_dirty PHP Method

_dirty() protected method

Marks a query as dirty, removing any preprocessed information from in memory caching.
protected _dirty ( ) : void
return void
    protected function _dirty()
    {
        $this->_dirty = true;
        if ($this->_iterator && $this->_valueBinder) {
            $this->valueBinder()->reset();
        }
    }

Usage Example

 /**
  * Marks a query as dirty, removing any preprocessed information
  * from in memory caching such as previous results
  *
  * @return void
  */
 protected function _dirty()
 {
     $this->_results = null;
     parent::_dirty();
 }