title: caching controller action if thread is changing
body: <p>If localization of the website is done in such a way that on every request in mvc controller I read current thread and upon that information partial view is loaded (cause every language has different partial view) and strings inside non partial view are localized using resource strings.</p>
  
  <p>Controller using data annotation to set Localize custom attribute</p>
  
  <pre><code>[Localize]
  public class HomeController : Controller
  {
      public ActionResult Index()
      {
          string partialView = string.Empty;
          switch (Thread.CurrentThread.CurrentCulture.ToString())
          {
              case "en-US":
              partialView = "english";
              ....
          }
          ViewBag.PartialViewName = partialView;
          return View();
      }
  }
  </code></pre>
  
  <blockquote>
    <p>my question is: how can I cache this <code>Index</code> action knowing that there
    is 7 different languages?</p>
  </blockquote>
  
  <p>Update:
  If I use for example </p>
  
  <pre><code>[OutputCache(Duration = 300)]
  public ActionResult Index()
  {}
  </code></pre>
  
  <p>then I'm losing switching language ability.</p>