eadam
eadam

Reputation: 26221

ASP.NET MVC 4 Wrong Cache for Mobile Site

In an MVC 4 APP, I have got Index.cshtml and Index.Mobile.cshtml. I have set controller cache to varyByParam="*".

In the Dev environment mobile site is loaded if I change the user agent of browser but in production it works ok for few minutes. After few minutes, If I load the mobile site, it still shows the cached version of non mobile page i.e index.cshtml.

How can use caching and still get the correct websites loaded. Should I cache it by custom or UserAgent?

Won't I have too many versions of each page in the cache If i use cache by user agent?

Upvotes: 0

Views: 327

Answers (1)

eadam
eadam

Reputation: 26221

This is fixed here...

http://aspnetwebstack.codeplex.com/workitem/280

Upvotes: 2

Related Questions