title: PHP: Slim Framework - using different response header per route
body: <p>is it possible to use a different response header in every route?</p>
  
  <p>You can see my sourcecode here:</p>
  
  <ol>
  <li>Indexfile:</li>
  </ol>
  
  <p><a href="https://github.com/Damian89/slim-filecaching/blob/master/index.php" rel="nofollow">https://github.com/Damian89/slim-filecaching/blob/master/index.php</a></p>
  
  <ol start="2">
  <li>Caching Middleware: </li>
  </ol>
  
  <p><a href="https://github.com/Damian89/slim-filecaching/blob/master/Caching.slim.php" rel="nofollow">https://github.com/Damian89/slim-filecaching/blob/master/Caching.slim.php</a></p>
  
  <p>I have two simple routes. I like to use caching only in the first case, not the second one - but it's not working.</p>
  
  <p>If you place the following code directly above the first route it works:</p>
  
  <pre><code>$app-&gt;response-&gt;headers-&gt;set( PageCaching::SLIM_PAGE_CACHER, PageCaching::CACHE_ENABLED);
  </code></pre>
  
  <p>But in this case both routes are cached.</p>
  
  <p>Any ideas?</p>
  
  <p>Thank you!</p>