protected function invalidate(Model $model): void
    {
        $key = $this->prefix . ":" . $model->getKey();
        if ($this->cacheRepository->has($key)) {
            $this->cacheRepository->forget($key);
        }
        $this->cacheRepository->forget("$this->prefix.:all");
    }
protected function invalidate(Model $model): void
    {
        $key = $this->prefix . ":" . $model->getKey();
        if ($this->cacheRepository->has($key)) {
            $this->cacheRepository->forget($key);
        }
        $this->cacheRepository->forget("$this->prefix.:all");
    }
protected function invalidate ( Model $ model ) : void { $ key = $ this -> prefix . ":" . $ model -> getKey ( ) ; if ( $ this -> cacheRepository -> has ( $ key ) ) { $ this -> cacheRepository -> forget ( $ key ) ; } $ this -> cacheRepository -> forget ( "$this->prefix.:all" ) ; }
Invalidate model in cache.

@param Model $model Model to invalidate

@return void

@throws InvalidArgumentException
Invalidate model in cache .