SlideShare ist ein Scribd-Unternehmen logo
1 von 3
OutputCacheAttribute
By Jax
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    
Using
[OutputCache(Duration = 3600, VaryByParam = "culture")] 
public ActionResult Index(string culture = "zh-TW") 
{ 

Weitere ähnliche Inhalte

Andere mochten auch

20131209 ms build_using_task By Anney
20131209 ms build_using_task By Anney20131209 ms build_using_task By Anney
20131209 ms build_using_task By AnneyLearningTech
 
How totestinternalprotectmethodsinc#
How totestinternalprotectmethodsinc#How totestinternalprotectmethodsinc#
How totestinternalprotectmethodsinc#LearningTech
 
Custom action filterattribute
Custom action filterattributeCustom action filterattribute
Custom action filterattributeLearningTech
 
Ms build的初體驗
Ms build的初體驗Ms build的初體驗
Ms build的初體驗LearningTech
 
Ian 2014.10.24 weekly report
Ian 2014.10.24 weekly reportIan 2014.10.24 weekly report
Ian 2014.10.24 weekly reportLearningTech
 
Ms build – inline task
Ms build – inline taskMs build – inline task
Ms build – inline taskLearningTech
 
Knockout validation 心得分享
Knockout validation 心得分享Knockout validation 心得分享
Knockout validation 心得分享LearningTech
 
Moq 的進階用法
Moq 的進階用法Moq 的進階用法
Moq 的進階用法LearningTech
 
Git rewriting git history
Git   rewriting git  historyGit   rewriting git  history
Git rewriting git historyLearningTech
 
20131108 Web.config transformation_syntax by jax
20131108 Web.config transformation_syntax by jax20131108 Web.config transformation_syntax by jax
20131108 Web.config transformation_syntax by jaxLearningTech
 
Presentasi My Bestlink Investment
Presentasi My Bestlink InvestmentPresentasi My Bestlink Investment
Presentasi My Bestlink InvestmentEliana Wati
 
Design pattern composite 20120413 joncash 01
Design pattern composite 20120413 joncash 01Design pattern composite 20120413 joncash 01
Design pattern composite 20120413 joncash 01LearningTech
 

Andere mochten auch (16)

Introducción tic
Introducción ticIntroducción tic
Introducción tic
 
AngularJS
AngularJSAngularJS
AngularJS
 
20131209 ms build_using_task By Anney
20131209 ms build_using_task By Anney20131209 ms build_using_task By Anney
20131209 ms build_using_task By Anney
 
How totestinternalprotectmethodsinc#
How totestinternalprotectmethodsinc#How totestinternalprotectmethodsinc#
How totestinternalprotectmethodsinc#
 
Custom action filterattribute
Custom action filterattributeCustom action filterattribute
Custom action filterattribute
 
Ms build的初體驗
Ms build的初體驗Ms build的初體驗
Ms build的初體驗
 
Ian 2014.10.24 weekly report
Ian 2014.10.24 weekly reportIan 2014.10.24 weekly report
Ian 2014.10.24 weekly report
 
Ms build – inline task
Ms build – inline taskMs build – inline task
Ms build – inline task
 
Knockout validation 心得分享
Knockout validation 心得分享Knockout validation 心得分享
Knockout validation 心得分享
 
Moq 的進階用法
Moq 的進階用法Moq 的進階用法
Moq 的進階用法
 
Git rewriting git history
Git   rewriting git  historyGit   rewriting git  history
Git rewriting git history
 
20131108 Web.config transformation_syntax by jax
20131108 Web.config transformation_syntax by jax20131108 Web.config transformation_syntax by jax
20131108 Web.config transformation_syntax by jax
 
Presentasi My Bestlink Investment
Presentasi My Bestlink InvestmentPresentasi My Bestlink Investment
Presentasi My Bestlink Investment
 
Powershell alias
Powershell aliasPowershell alias
Powershell alias
 
Dynamic query
Dynamic queryDynamic query
Dynamic query
 
Design pattern composite 20120413 joncash 01
Design pattern composite 20120413 joncash 01Design pattern composite 20120413 joncash 01
Design pattern composite 20120413 joncash 01
 

Mehr von LearningTech

Mehr von LearningTech (20)

vim
vimvim
vim
 
PostCss
PostCssPostCss
PostCss
 
ReactJs
ReactJsReactJs
ReactJs
 
Docker
DockerDocker
Docker
 
Semantic ui
Semantic uiSemantic ui
Semantic ui
 
node.js errors
node.js errorsnode.js errors
node.js errors
 
Process control nodejs
Process control nodejsProcess control nodejs
Process control nodejs
 
Expression tree
Expression treeExpression tree
Expression tree
 
SQL 效能調校
SQL 效能調校SQL 效能調校
SQL 效能調校
 
flexbox report
flexbox reportflexbox report
flexbox report
 
Vic weekly learning_20160504
Vic weekly learning_20160504Vic weekly learning_20160504
Vic weekly learning_20160504
 
Reflection & activator
Reflection & activatorReflection & activator
Reflection & activator
 
Peggy markdown
Peggy markdownPeggy markdown
Peggy markdown
 
Node child process
Node child processNode child process
Node child process
 
20160415ken.lee
20160415ken.lee20160415ken.lee
20160415ken.lee
 
Peggy elasticsearch應用
Peggy elasticsearch應用Peggy elasticsearch應用
Peggy elasticsearch應用
 
Expression tree
Expression treeExpression tree
Expression tree
 
Vic weekly learning_20160325
Vic weekly learning_20160325Vic weekly learning_20160325
Vic weekly learning_20160325
 
D3js learning tips
D3js learning tipsD3js learning tips
D3js learning tips
 
git command
git commandgit command
git command
 

Output cacheattribute