/** * Set cache options * * @param string $key * @param Carbon|Datetime|int $duration * @param boolean $useCache */ public function setCache($key = null, $duration = null, $useCache = true) { $this->model->setUseCache($useCache); if ($key !== null) { $this->model->setCacheKey($key); } if ($duration !== null) { $this->model->setCacheDuration($duration); } }