Is the Standard OutputCache attribute per user or per application

If I add the following to my application / controller

[OutputCache(Duration = 7200)]

And I have two users on the site User1 and User2. If User1 views the page with OutputCache enabled above, the server caches the HTML on the page.

If User2 then requests the same page, should the server re-execute the page (because it is a different user) or does it use the same cached copy when user1 accesses the page?

+4
source share
1 answer

It will use the same cache for all users. If you do not want the cache to be shared between users, you can:

  • - .

  • VaryByCustom OutputCache, , , .

+5

All Articles