original_string: 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");
      }
code: 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");
      }
code_tokens: 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" ) ; }
docstring: Invalidate model in cache.
  
  @param Model $model Model to invalidate
  
  @return void
  
  @throws InvalidArgumentException
docstring_tokens: Invalidate model in cache .