SlideShare une entreprise Scribd logo
1  sur  24
Microsoft ASP.NET: An Overview of Caching Holly Mazerolle Developer Support Engineer  Microsoft Developer Support  Microsoft Corporation
Overview ,[object Object],[object Object],[object Object],[object Object]
Introduction to Caching in ASP.NET ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Output Caching ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What Is Output Caching? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
@ OutputCache Directive and the  Cache Object ,[object Object],[object Object],[object Object],<%@ OutputCache Duration=&quot;600“ Location=&quot;Any“ VaryByParm=“none” %> Is equivalent to: [C#] Response.Cache.SetExpires(DateTime.Now.AddSeconds(600)); Response.Cache.SetCacheability(HttpCacheability.Public);
OutputCache Members:  Duration and Location ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],<%@ OutputCache Duration=&quot;600&quot; Location=&quot;Any“ VaryByParam=“none” %>
OutputCache Members:  VaryByParam and VaryByHeader ,[object Object],[object Object],[object Object],[object Object],<%@ OutputCache Duration=&quot;10“ VaryByParam=&quot;location;count&quot; %> <%@ OutputCache Duration=&quot;60“ VaryByHeader=&quot;Accept-Language&quot; %>
OutputCache Members:  VaryByCustom ,[object Object],[object Object],[object Object]
Fragment Caching ,[object Object],[object Object],[object Object],[object Object]
What Is Fragment Caching? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Fragment Caching a User Control ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
VaryByControl ,[object Object],[object Object],[object Object],[object Object],<%@ OutputCache Duration=&quot;10“ VaryByControl=&quot;State;Country“ VaryByParam=&quot;*&quot;%>
Nested Cached User Controls  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Cached Controls Are Not Programmable  ,[object Object],[object Object],[object Object]
Data Caching ,[object Object],[object Object],[object Object],[object Object],[object Object]
What Is Data Caching? ,[object Object],[object Object],[object Object],Cache (“counter”) = mycount.text Application(“counter”) =   mycount.text
Working with the Cache Object ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Public Function GetProductData() As DataSet If (IsNothing(Cache(&quot;ProductData&quot;)) Then Cache(&quot;ProductData&quot;) = LoadDataSet()    Return Cache(&quot;ProductData&quot;) End Function
Cache Dependencies ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Scavenging Memory ,[object Object],[object Object],[object Object],[object Object],[object Object]
Using Callbacks with Caching ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Review ,[object Object],[object Object],[object Object]
Additional Information about Caching ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Contenu connexe

Tendances

Tips and Tricks For Faster Asp.NET and MVC Applications
Tips and Tricks For Faster Asp.NET and MVC ApplicationsTips and Tricks For Faster Asp.NET and MVC Applications
Tips and Tricks For Faster Asp.NET and MVC ApplicationsSarvesh Kushwaha
 
Real World Caching with Ruby on Rails
Real World Caching with Ruby on RailsReal World Caching with Ruby on Rails
Real World Caching with Ruby on RailsDavid Roberts
 
Esri Dev Summit 2009 Rest and Mvc Final
Esri Dev Summit 2009 Rest and Mvc FinalEsri Dev Summit 2009 Rest and Mvc Final
Esri Dev Summit 2009 Rest and Mvc Finalguestcd4688
 
What I Learned About SQL Server at Ignite 2015
What I Learned About SQL Server at Ignite 2015What I Learned About SQL Server at Ignite 2015
What I Learned About SQL Server at Ignite 2015Brent Ozar
 
How Varnish & MongoDB Scale Business Insider
How Varnish & MongoDB Scale Business InsiderHow Varnish & MongoDB Scale Business Insider
How Varnish & MongoDB Scale Business InsiderPax Dickinson
 
Scale Your Data Tier With Windows Server App Fabric
Scale Your Data Tier With Windows Server App FabricScale Your Data Tier With Windows Server App Fabric
Scale Your Data Tier With Windows Server App FabricChris Dufour
 
Frontend performance
Frontend performanceFrontend performance
Frontend performancesacred 8
 
High performance coding practices code project
High performance coding practices code projectHigh performance coding practices code project
High performance coding practices code projectPruthvi B Patil
 
How to reduce database load using Memcache
How to reduce database load using MemcacheHow to reduce database load using Memcache
How to reduce database load using Memcachevaluebound
 
Servlet sessions
Servlet sessionsServlet sessions
Servlet sessionsvantinhkhuc
 
How to Optimize the Performance of Your DNN Website
How to Optimize the Performance of Your DNN WebsiteHow to Optimize the Performance of Your DNN Website
How to Optimize the Performance of Your DNN WebsiteDNN
 
State management
State managementState management
State managementIblesoft
 
Effectively Scale and Operate AEM with MongoDB by Norberto Leite
Effectively Scale and Operate AEM with MongoDB by Norberto LeiteEffectively Scale and Operate AEM with MongoDB by Norberto Leite
Effectively Scale and Operate AEM with MongoDB by Norberto LeiteAEM HUB
 

Tendances (14)

Tips and Tricks For Faster Asp.NET and MVC Applications
Tips and Tricks For Faster Asp.NET and MVC ApplicationsTips and Tricks For Faster Asp.NET and MVC Applications
Tips and Tricks For Faster Asp.NET and MVC Applications
 
Real World Caching with Ruby on Rails
Real World Caching with Ruby on RailsReal World Caching with Ruby on Rails
Real World Caching with Ruby on Rails
 
Esri Dev Summit 2009 Rest and Mvc Final
Esri Dev Summit 2009 Rest and Mvc FinalEsri Dev Summit 2009 Rest and Mvc Final
Esri Dev Summit 2009 Rest and Mvc Final
 
What I Learned About SQL Server at Ignite 2015
What I Learned About SQL Server at Ignite 2015What I Learned About SQL Server at Ignite 2015
What I Learned About SQL Server at Ignite 2015
 
How Varnish & MongoDB Scale Business Insider
How Varnish & MongoDB Scale Business InsiderHow Varnish & MongoDB Scale Business Insider
How Varnish & MongoDB Scale Business Insider
 
Scale Your Data Tier With Windows Server App Fabric
Scale Your Data Tier With Windows Server App FabricScale Your Data Tier With Windows Server App Fabric
Scale Your Data Tier With Windows Server App Fabric
 
Frontend performance
Frontend performanceFrontend performance
Frontend performance
 
High performance coding practices code project
High performance coding practices code projectHigh performance coding practices code project
High performance coding practices code project
 
How to reduce database load using Memcache
How to reduce database load using MemcacheHow to reduce database load using Memcache
How to reduce database load using Memcache
 
Jquery Ajax
Jquery AjaxJquery Ajax
Jquery Ajax
 
Servlet sessions
Servlet sessionsServlet sessions
Servlet sessions
 
How to Optimize the Performance of Your DNN Website
How to Optimize the Performance of Your DNN WebsiteHow to Optimize the Performance of Your DNN Website
How to Optimize the Performance of Your DNN Website
 
State management
State managementState management
State management
 
Effectively Scale and Operate AEM with MongoDB by Norberto Leite
Effectively Scale and Operate AEM with MongoDB by Norberto LeiteEffectively Scale and Operate AEM with MongoDB by Norberto Leite
Effectively Scale and Operate AEM with MongoDB by Norberto Leite
 

En vedette (8)

Libro tercero cpv
Libro tercero cpvLibro tercero cpv
Libro tercero cpv
 
What Real People Say
What Real People Say What Real People Say
What Real People Say
 
Trabajo: 3
Trabajo: 3Trabajo: 3
Trabajo: 3
 
Division homework sheet
Division homework sheetDivision homework sheet
Division homework sheet
 
Aplicaciones clave pawer point
Aplicaciones  clave  pawer pointAplicaciones  clave  pawer point
Aplicaciones clave pawer point
 
Lateclaim
LateclaimLateclaim
Lateclaim
 
The Complete Guide To Event Hashtags
The Complete Guide To Event HashtagsThe Complete Guide To Event Hashtags
The Complete Guide To Event Hashtags
 
iOS 6 Tips and Tricks
iOS 6 Tips and TricksiOS 6 Tips and Tricks
iOS 6 Tips and Tricks
 

Similaire à askldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdf

ASP.NET 4.0 Cache Extensibility
ASP.NET 4.0 Cache ExtensibilityASP.NET 4.0 Cache Extensibility
ASP.NET 4.0 Cache Extensibilityakrakovetsky
 
Build A Killer Client For Your REST+JSON API
Build A Killer Client For Your REST+JSON APIBuild A Killer Client For Your REST+JSON API
Build A Killer Client For Your REST+JSON APIStormpath
 
Dotnet caching techniques
Dotnet caching techniquesDotnet caching techniques
Dotnet caching techniquesShivam Lohiya
 
State management 1
State management 1State management 1
State management 1singhadarsh
 
TechDays 2010 Portugal - Scaling your data tier with app fabric 16x9
TechDays 2010 Portugal - Scaling your data tier with app fabric 16x9TechDays 2010 Portugal - Scaling your data tier with app fabric 16x9
TechDays 2010 Portugal - Scaling your data tier with app fabric 16x9Nuno Godinho
 
Rails Caching Secrets from the Edge
Rails Caching Secrets from the EdgeRails Caching Secrets from the Edge
Rails Caching Secrets from the EdgeMichael May
 
Windows Server AppFabric Caching - What it is & when you should use it?
Windows Server AppFabric Caching - What it is & when you should use it?Windows Server AppFabric Caching - What it is & when you should use it?
Windows Server AppFabric Caching - What it is & when you should use it?Robert MacLean
 
Scale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabricScale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabricWim Van den Broeck
 
Ehcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage PatternsEhcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage PatternsEduardo Pelegri-Llopart
 
Ride on the Fast Track of Web with Ruby on Rails- Part 2
Ride on the Fast Track of Web with Ruby on Rails- Part 2Ride on the Fast Track of Web with Ruby on Rails- Part 2
Ride on the Fast Track of Web with Ruby on Rails- Part 2A.K.M. Ahsrafuzzaman
 
Html5 cache mechanism & local storage
Html5 cache mechanism & local storageHtml5 cache mechanism & local storage
Html5 cache mechanism & local storageSendhil Kumar Kannan
 
Build a Node.js Client for Your REST+JSON API
Build a Node.js Client for Your REST+JSON APIBuild a Node.js Client for Your REST+JSON API
Build a Node.js Client for Your REST+JSON APIStormpath
 
ASP.NET 12 - State Management
ASP.NET 12 - State ManagementASP.NET 12 - State Management
ASP.NET 12 - State ManagementRandy Connolly
 

Similaire à askldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdf (20)

2310 b 15
2310 b 152310 b 15
2310 b 15
 
Chapter 23
Chapter 23Chapter 23
Chapter 23
 
Caching in asp.net
Caching in asp.netCaching in asp.net
Caching in asp.net
 
Caching in asp.net
Caching in asp.netCaching in asp.net
Caching in asp.net
 
ASP.NET 4.0 Cache Extensibility
ASP.NET 4.0 Cache ExtensibilityASP.NET 4.0 Cache Extensibility
ASP.NET 4.0 Cache Extensibility
 
Build A Killer Client For Your REST+JSON API
Build A Killer Client For Your REST+JSON APIBuild A Killer Client For Your REST+JSON API
Build A Killer Client For Your REST+JSON API
 
Dotnet caching techniques
Dotnet caching techniquesDotnet caching techniques
Dotnet caching techniques
 
catching in c#.pptx
catching in c#.pptxcatching in c#.pptx
catching in c#.pptx
 
State management 1
State management 1State management 1
State management 1
 
TechDays 2010 Portugal - Scaling your data tier with app fabric 16x9
TechDays 2010 Portugal - Scaling your data tier with app fabric 16x9TechDays 2010 Portugal - Scaling your data tier with app fabric 16x9
TechDays 2010 Portugal - Scaling your data tier with app fabric 16x9
 
Rails Caching Secrets from the Edge
Rails Caching Secrets from the EdgeRails Caching Secrets from the Edge
Rails Caching Secrets from the Edge
 
Windows Server AppFabric Caching - What it is & when you should use it?
Windows Server AppFabric Caching - What it is & when you should use it?Windows Server AppFabric Caching - What it is & when you should use it?
Windows Server AppFabric Caching - What it is & when you should use it?
 
Scale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabricScale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabric
 
Ehcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage PatternsEhcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage Patterns
 
Ride on the Fast Track of Web with Ruby on Rails- Part 2
Ride on the Fast Track of Web with Ruby on Rails- Part 2Ride on the Fast Track of Web with Ruby on Rails- Part 2
Ride on the Fast Track of Web with Ruby on Rails- Part 2
 
Html5 cache mechanism & local storage
Html5 cache mechanism & local storageHtml5 cache mechanism & local storage
Html5 cache mechanism & local storage
 
ASP.NET Lecture 2
ASP.NET Lecture 2ASP.NET Lecture 2
ASP.NET Lecture 2
 
Build a Node.js Client for Your REST+JSON API
Build a Node.js Client for Your REST+JSON APIBuild a Node.js Client for Your REST+JSON API
Build a Node.js Client for Your REST+JSON API
 
Caching in Kentico 11
Caching in Kentico 11Caching in Kentico 11
Caching in Kentico 11
 
ASP.NET 12 - State Management
ASP.NET 12 - State ManagementASP.NET 12 - State Management
ASP.NET 12 - State Management
 

Plus de elodiaevie

Plus de elodiaevie (7)

aergserga
aergsergaaergserga
aergserga
 
awergaezrg
awergaezrgawergaezrg
awergaezrg
 
sergaerwga
sergaerwgasergaerwga
sergaerwga
 
aksdfhaskdjfhasdjkh
aksdfhaskdjfhasdjkhaksdfhaskdjfhasdjkh
aksdfhaskdjfhasdjkh
 
srtghsrths
srtghsrthssrtghsrths
srtghsrths
 
sakdjfhaksjfhaskjh
sakdjfhaksjfhaskjhsakdjfhaksjfhaskjh
sakdjfhaksjfhaskjh
 
salkdjfhdjkghdfkjh
salkdjfhdjkghdfkjhsalkdjfhdjkghdfkjh
salkdjfhdjkghdfkjh
 

askldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdf

  • 1. Microsoft ASP.NET: An Overview of Caching Holly Mazerolle Developer Support Engineer Microsoft Developer Support Microsoft Corporation
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.