Output cacheattribute

51 views
16 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
51
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Output cacheattribute

  1. 1. OutputCacheAttribute By Jax
  2. 2. Properties • string CacheProfile  • int Duration  • bool NoStore   • string SqlDependency  • string VaryByContentEncoding // Accept-Encoding  • string VaryByCustom // override GetVaryByCustomString in Global.asax.cs  • string VaryByHeader // User-Agent Accept-Charset Accept-Language  • string VaryByParam • OutputCacheLocation Location    
  3. 3. Using [OutputCache(Duration = 3600, VaryByParam = "culture")]  public ActionResult Index(string culture = "zh-TW")  { 

×