original_string: protected function fetch(Request $request, $catch = false)
      {
          $subRequest = clone $request;
  
          // send no head requests because we want content
          if ('HEAD' === $request->getMethod()) {
              $subRequest->setMethod('GET');
          }
  
          // avoid that the backend sends no content
          $subRequest->headers->remove('if_modified_since');
          $subRequest->headers->remove('if_none_match');
  
          $response = $this->forward($subRequest, $catch);
  
          if ($response->isCacheable()) {
              $this->store($request, $response);
          }
  
          return $response;
      }
code: protected function fetch(Request $request, $catch = false)
      {
          $subRequest = clone $request;
  
          // send no head requests because we want content
          if ('HEAD' === $request->getMethod()) {
              $subRequest->setMethod('GET');
          }
  
          // avoid that the backend sends no content
          $subRequest->headers->remove('if_modified_since');
          $subRequest->headers->remove('if_none_match');
  
          $response = $this->forward($subRequest, $catch);
  
          if ($response->isCacheable()) {
              $this->store($request, $response);
          }
  
          return $response;
      }
code_tokens: protected function fetch ( Request $ request , $ catch = false ) { $ subRequest = clone $ request ; // send no head requests because we want content if ( 'HEAD' === $ request -> getMethod ( ) ) { $ subRequest -> setMethod ( 'GET' ) ; } // avoid that the backend sends no content $ subRequest -> headers -> remove ( 'if_modified_since' ) ; $ subRequest -> headers -> remove ( 'if_none_match' ) ; $ response = $ this -> forward ( $ subRequest , $ catch ) ; if ( $ response -> isCacheable ( ) ) { $ this -> store ( $ request , $ response ) ; } return $ response ; }
docstring: Unconditionally fetches a fresh response from the backend and
  stores it in the cache if is cacheable.
  
  @param Request $request A Request instance
  @param bool    $catch   Whether to process exceptions
  
  @return Response A Response instance
docstring_tokens: Unconditionally fetches a fresh response from the backend and stores it in the cache if is cacheable .