title: Typo3 Page Cache based on Cookie Value
body: <p>I need a hint for a problem i have with an upcoming typo3 project. The content of this website should adapt based on a cookie the user can set. Basicly these cookie describe a market region like &quot;US&quot; or &quot;EU&quot; and some parts of the content (pages,CEs, etc) will be shown or hidden based on this value, but a big chunk of the content will stay the same between the markets, so it would make no sense to create unique site-trees or something similar.</p>
  <p>Basicly the content of a page should be cached also by the value of this cookie, f.e.:</p>
  <ul>
  <li>Market 1
  <ul>
  <li>Page A</li>
  <li>Page B</li>
  <li>Page C</li>
  </ul>
  </li>
  <li>Market 2
  <ul>
  <li>Page A</li>
  <li>Page B</li>
  <li>...</li>
  </ul>
  </li>
  </ul>
  <p>I created middlewares for setting the cookie value and for page rendering (rendering a 404 if a page is not meant for this market f.e.) but i could not find a way to inject the value of the cookie for fluid rendering and caching.</p>
  <p>Can someone point me in the right direction? Or should i reconsider my approach?</p>
  <p>Thank you very much in advance :).</p>