title: How to Prevent a request from being cached for LANGUAGE SWITCH routing Laravel Spatie responsecache
body: <p>I am using Laravel Spatie response cache: <a href="https://github.com/spatie/laravel-responsecache" rel="nofollow noreferrer">https://github.com/spatie/laravel-responsecache</a> and Multiple language (language switch..).</p>
  
  <p>How to fix: Preventing a request from being cached for language switcher route in Laravel.</p>
  
  <p>I tried to add: ->middleware('doNotCacheResponse'); in lang.switch route but without success...</p>
  
  <pre><code>Route::get('lang/{language}', ['as' =&gt; 'lang.switch', 'uses' =&gt; 'LanguageController@switchLang'])-&gt;middleware('doNotCacheResponse');
  </code></pre>
  
  <p>Expected results to prevent request when switching pages (links) between language to be cached....</p>