/** * Find an entry with it's ID * @param $id int ID of the Entry * @return mixed */ public function byId($questionId, $id) { $this->key = $this->key . '-' . $questionId . '-' . $this->classKey . '-' . $id; return $this->cache->tags($this->baseCacheKey)->sear($this->getKey($this->key), function () use($questionId, $id) { return $this->model->byId($questionId, $id); }); }
/** * Find an entry with it's ID * @param $id int ID of the Entry * @return mixed */ public function byId($id) { return $this->cache->sear($this->getKey('id-' . $id), function () use($id) { return $this->model->byId($id); }); }