title: Nginx cache pages based on cookie value
body: <p>I am very new to Nginx and trying to understand if something like this is possible within NGINX world. We are thinking to setup NGINX static page caching on our existing web application, however we would like to cache pages based on a certain cookie value. </p>
  
  <p>For example:</p>
  
  <p>If an incoming request has a cookie called XYZ with value "123", only then we would like to cache that page for lets just say 3 hours. If not we don't want to cache it.</p>
  
  <p>Is something like this is possible with NGINX? if so, can someone help?</p>
  
  <p>Thanks in advance.</p>