/** * Get the unique cache key for the query. * * @return string */ public function getCacheKey() { $name = $this->model->getConnectionName(); return md5($name . $this->toSql() . serialize($this->getBindings())); }