title: Caching multilingual Template
body: <p>I have a class called language.php in my environment which handles the language detection and includes the proper language file with all it's variables.</p>
  
  <p>When a template is not cached already, i cache it via <strong>APC</strong> and sent the cache entry to the visitor.</p>
  
  <p>But now when i try to make my environment multilingual, and i change my languages from <strong>en-US</strong> to <strong>de-DE</strong> and then <strong><em>back to en-US</em></strong> i still get the cached <strong>de-DE</strong> template.</p>
  
  <p>Are there any intelligent approaches to this problem that i can work with and elaborate?</p>
  
  <p><strong>EDIT:</strong>
  My parsing/caching function: <a href="http://pastebin.com/PpHJ14Wv" rel="nofollow">http://pastebin.com/PpHJ14Wv</a></p>