original_string: public function handle($request, Closure $next, $options = [])
      {
          $response = $next($request);
  
          if (! $request->isMethodCacheable() || ! $response->getContent()) {
              return $response;
          }
  
          if (is_string($options)) {
              $options = $this->parseOptions($options);
          }
  
          if (isset($options['etag']) && $options['etag'] === true) {
              $options['etag'] = md5($response->getContent());
          }
  
          $response->setCache($options);
          $response->isNotModified($request);
  
          return $response;
      }
code: public function handle($request, Closure $next, $options = [])
      {
          $response = $next($request);
  
          if (! $request->isMethodCacheable() || ! $response->getContent()) {
              return $response;
          }
  
          if (is_string($options)) {
              $options = $this->parseOptions($options);
          }
  
          if (isset($options['etag']) && $options['etag'] === true) {
              $options['etag'] = md5($response->getContent());
          }
  
          $response->setCache($options);
          $response->isNotModified($request);
  
          return $response;
      }
code_tokens: public function handle ( $ request , Closure $ next , $ options = [ ] ) { $ response = $ next ( $ request ) ; if ( ! $ request -> isMethodCacheable ( ) || ! $ response -> getContent ( ) ) { return $ response ; } if ( is_string ( $ options ) ) { $ options = $ this -> parseOptions ( $ options ) ; } if ( isset ( $ options [ 'etag' ] ) && $ options [ 'etag' ] === true ) { $ options [ 'etag' ] = md5 ( $ response -> getContent ( ) ) ; } $ response -> setCache ( $ options ) ; $ response -> isNotModified ( $ request ) ; return $ response ; }
docstring: Add cache related HTTP headers.
  
  @param  \Illuminate\Http\Request  $request
  @param  \Closure  $next
  @param  string|array  $options
  @return \Symfony\Component\HttpFoundation\Response
  
  @throws \InvalidArgumentException
docstring_tokens: Add cache related HTTP headers .