SlideShare uma empresa Scribd logo
1 de 24
ASP.NET 4.0 Cache Extensibility 	Stefan SchackowProgram Manager 	Microsoft Corporation PC41
What's the current state? Why is it changing? How are we changing it? .NET Framework Caching
A great in-memory object cache in ASP.NET Lots of configurable "knobs" Expiration policies Automatic scavenging behavior Before and after removal callbacks Extensible cache dependencies Output caching of ASP.NET content Pages  Fragment caching of ASP.NET controls Donut caching with cache substitution Output caching of arbitrary HTTP response Current Cache Functionality
In-memory cache has various constraints Object cache API exists in System.Web Awkward to use object cache outside of ASP.NET Common question:  Why do I have to include System.Web.dll in my WPF/Winforms project? Not available in 3.5 SP1 Client SKU Caching is a "black box" Where can vendors and developers plugin? Memcached, Velocity, ScaleOut, etc… have no clean integration point available to them Output caching is completely opaque Each custom caching solution is a completely different API for developers to learn Why Make Changes?
Proposed New Cache Functionality A new, extensible, object cache API in its own namespace and assembly Supports both client and server applications Can be made available on both desktop and client SKUs A factored version of the ASP.NET cache engine Extensible ASP.NET output caching Consistent APIs for programming against Disk-based output caches Custom object caches Cloud-based object caches Distributed object caches
New 4.0 Cache Functionality Namespace System.Caching { In-memory Disk based Cache Windows Azure CacheProvider Distributed }
New 4.0 Cache Functionality Namespace System.Caching { CacheItemPolicy (expirations, priority, callbacks) CacheItem Cache CacheItem CacheItem CacheDependency (Sql, Key-based, File) }
Object Caching demo
New 4.0 Output Cache Functionality Namespace System.Web.Caching { Default.aspx In-memory Disk based Foo.ascx Windows Azure OutputCacheProvider Distributed }
Output Caching demo
Core Versus Optional APIs Cache API is a "union" of common functionality Not all cache providers need to implement all features Core functionality for all providers Represented on CacheProvider base type Storing and retrieving a key-value pair Basic Add/Get/Set/Contains/Remove methods Named cache partitions Providers specialize by deriving from InMemoryCacheProvider OutOfProcessCacheProvider
InMemoryCacheProvider Represents a provider running exclusively in a single app-domain Count of items in cache Sliding expirations Distributed caches usually can't synchronize sliding expiration values across multiple servers Cache dependencies (derivations of CacheDependency) Distributed caches may have no concept of dependencies Item removal callbacks (before and after removal) Distributed caches may not be able to call back to anything
OutOfProcessCacheProvider Represents a provider that stores data outside of an app-domain Version-based updates (CacheItem.Version) Useful for caches that support optimistic concurrency Lock-based updates (CacheItem.LockHandle) If a cache supports pessimistic concurrency Get multiple items Saves multiple round-trips on fetches Query-tag metadata (CacheItem.QueryTags) Retrieving multiple cache items based on string tags
"Velocity" Integration "Velocity" – codename for distributed cache created by the Sql Server team Planned "Velocity" integration points OutOfProcessCacheProvider implementation for object caching SessionStateStoreProviderBase implementation for ASP.NET session state Sidenote:  Updates to session state API are planned in 4.0 to allow for more granular sets and gets. OutputCacheProvider implementation for ASP.NET output caching
Checking cache capabilities demo
Migrating From Existing APIs System.Web.Caching.Cache Current plan is that it stays un-changed Might enable "opting-in" to using an object cache provider Requires developing a “shim” that can re-route calls to the new object cache provider layer Currently the “shim” is only in the “idea phase” ASP.NET output caching Both page and control caching can opt-in to using custom providers By default both types of output caching continue to use ASP.NET’s in-memory cache
Migrating From Existing APIs ASP.NET control output caching <@OutputCacheoutputCacheProvider="…" /> ASP.NET page output caching Programmatically choose different providers  Override a new method on HttpApplication HttpApplication.GetOutputCacheProviderName Custom page output caching supports: Absolute expirations File-based dependencies only Validation and substitution callbacks must be static
Migrating From Existing APIs
Summary 4.0 Caching is all about extensibility! Both object caching and ASP.NET output caching will be pluggable New object cache APIs available for both client and full versions of .NET Framework
Related Content Breakout Sessions/Chalk Talks PC21 – ASP.NET MVC PC30 – ASP.NET Dynamic Data PC31 – ASP.NET and Jquery PC32 – ASP.NET Ajax Futures PC33 – Microsoft Visual Studio: Easing ASP.NET WebDev PC41 – ASP.NET Cache Extensibility TL48 – Microsoft Visual Studio: Web Development Futures ES15 – Deploying Web Applications with Microsoft Internet Information Services 7.0 and the Web Deployment Tool
Evals & Recordings Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com
Please use the microphones provided Q&A
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.   MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
ASP.NET 4.0 Cache Extensibility

Mais conteúdo relacionado

Mais procurados

Module Owb Advanced Features
Module Owb Advanced FeaturesModule Owb Advanced Features
Module Owb Advanced Features
Nicholas Goodman
 

Mais procurados (20)

Boost Your Content Strategy for REST APIs with Gururaj BS
Boost Your Content Strategy for REST APIs with Gururaj BSBoost Your Content Strategy for REST APIs with Gururaj BS
Boost Your Content Strategy for REST APIs with Gururaj BS
 
Apache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip HanikApache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip Hanik
 
11g r2 flashcache_Tips
11g r2 flashcache_Tips11g r2 flashcache_Tips
11g r2 flashcache_Tips
 
Advanced Java
Advanced JavaAdvanced Java
Advanced Java
 
Module Owb Advanced Features
Module Owb Advanced FeaturesModule Owb Advanced Features
Module Owb Advanced Features
 
.NET Core, ASP.NET Core Course, Session 1
.NET Core, ASP.NET Core Course, Session 1.NET Core, ASP.NET Core Course, Session 1
.NET Core, ASP.NET Core Course, Session 1
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
"Building intuitive command-line interfaces in .NET", Alex Thissen
"Building intuitive command-line interfaces in .NET", Alex Thissen"Building intuitive command-line interfaces in .NET", Alex Thissen
"Building intuitive command-line interfaces in .NET", Alex Thissen
 
Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On Concurrency
 
Tomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance TuningTomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance Tuning
 
.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6
 
Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On Concurrency
 
Servlets lecture1
Servlets lecture1Servlets lecture1
Servlets lecture1
 
Architecting Large Enterprise Java Projects
Architecting Large Enterprise Java ProjectsArchitecting Large Enterprise Java Projects
Architecting Large Enterprise Java Projects
 
Jsp servlets
Jsp servletsJsp servlets
Jsp servlets
 
Java troubleshooting thread dump
Java troubleshooting thread dumpJava troubleshooting thread dump
Java troubleshooting thread dump
 
Testing Web Apps with Spring Framework 3.2
Testing Web Apps with Spring Framework 3.2Testing Web Apps with Spring Framework 3.2
Testing Web Apps with Spring Framework 3.2
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
 
Testing Web Apps with Spring Framework
Testing Web Apps with Spring FrameworkTesting Web Apps with Spring Framework
Testing Web Apps with Spring Framework
 

Semelhante a ASP.NET 4.0 Cache Extensibility

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
Nuno Godinho
 

Semelhante a ASP.NET 4.0 Cache Extensibility (20)

NCache 3.8 SP3
NCache 3.8 SP3NCache 3.8 SP3
NCache 3.8 SP3
 
2310 b 15
2310 b 152310 b 15
2310 b 15
 
2310 b 15
2310 b 152310 b 15
2310 b 15
 
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
 
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?
 
Varnish and Drupal- Accelerating Website Performance and Flexibility with Var...
Varnish and Drupal- Accelerating Website Performance and Flexibility with Var...Varnish and Drupal- Accelerating Website Performance and Flexibility with Var...
Varnish and Drupal- Accelerating Website Performance and Flexibility with Var...
 
Four Ways to Improve ASP .NET Performance and Scalability
 Four Ways to Improve ASP .NET Performance and Scalability Four Ways to Improve ASP .NET Performance and Scalability
Four Ways to Improve ASP .NET Performance and Scalability
 
Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...
 
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
 
Building High Performance and Scalable Applications Using AppFabric Cache- Im...
Building High Performance and Scalable Applications Using AppFabric Cache- Im...Building High Performance and Scalable Applications Using AppFabric Cache- Im...
Building High Performance and Scalable Applications Using AppFabric Cache- Im...
 
Caching objects-in-memory
Caching objects-in-memoryCaching objects-in-memory
Caching objects-in-memory
 
Microsoft Windows Server AppFabric
Microsoft Windows Server AppFabricMicrosoft Windows Server AppFabric
Microsoft Windows Server AppFabric
 
awergaezrg
awergaezrgawergaezrg
awergaezrg
 
sakdjfhaksjfhaskjh
sakdjfhaksjfhaskjhsakdjfhaksjfhaskjh
sakdjfhaksjfhaskjh
 
salkdjfhdjkghdfkjh
salkdjfhdjkghdfkjhsalkdjfhdjkghdfkjh
salkdjfhdjkghdfkjh
 
aksdfhaskdjfhasdjkh
aksdfhaskdjfhasdjkhaksdfhaskdjfhasdjkh
aksdfhaskdjfhasdjkh
 
askldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdf
askldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdfaskldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdf
askldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdf
 
aergserga
aergsergaaergserga
aergserga
 
sergaerwga
sergaerwgasergaerwga
sergaerwga
 
sample1
sample1sample1
sample1
 

Mais de akrakovetsky

qiss.IM - wp7rocks.com
qiss.IM - wp7rocks.comqiss.IM - wp7rocks.com
qiss.IM - wp7rocks.com
akrakovetsky
 

Mais de akrakovetsky (17)

Alco calculator
Alco calculatorAlco calculator
Alco calculator
 
qiss.IM - wp7rocks.com
qiss.IM - wp7rocks.comqiss.IM - wp7rocks.com
qiss.IM - wp7rocks.com
 
Семантический HTML5 - iForum
Семантический HTML5 - iForumСемантический HTML5 - iForum
Семантический HTML5 - iForum
 
Что нового в Visual Studio 2010 и .Net 4.0
Что нового в Visual Studio 2010 и .Net 4.0Что нового в Visual Studio 2010 и .Net 4.0
Что нового в Visual Studio 2010 и .Net 4.0
 
Dependency Injection на примере Unity и NInject
Dependency Injection на примере Unity и NInjectDependency Injection на примере Unity и NInject
Dependency Injection на примере Unity и NInject
 
jQuery для ASP.NET разработчиков
jQuery для ASP.NET разработчиковjQuery для ASP.NET разработчиков
jQuery для ASP.NET разработчиков
 
Функциональное программирование на F#
Функциональное программирование на F#Функциональное программирование на F#
Функциональное программирование на F#
 
Переходим на Windows 7 и Windows 2008 R2
Переходим на Windows 7 и Windows 2008 R2Переходим на Windows 7 и Windows 2008 R2
Переходим на Windows 7 и Windows 2008 R2
 
Разработка и раскрутка iPhone приложений "с нуля"
Разработка и раскрутка iPhone приложений "с нуля"Разработка и раскрутка iPhone приложений "с нуля"
Разработка и раскрутка iPhone приложений "с нуля"
 
Основи розробки ігор на платформі XNA
Основи розробки ігор на платформі XNAОснови розробки ігор на платформі XNA
Основи розробки ігор на платформі XNA
 
Html5
Html5Html5
Html5
 
Введение в Microsoft Silverlight 3.0
Введение в Microsoft Silverlight 3.0Введение в Microsoft Silverlight 3.0
Введение в Microsoft Silverlight 3.0
 
Microsoft .NET User Group Вінниця #4
Microsoft .NET User Group Вінниця #4Microsoft .NET User Group Вінниця #4
Microsoft .NET User Group Вінниця #4
 
What's new in Visual Studio 2010.
What's new in Visual Studio 2010.What's new in Visual Studio 2010.
What's new in Visual Studio 2010.
 
Что нового в ASP.NET 4
Что нового в ASP.NET 4Что нового в ASP.NET 4
Что нового в ASP.NET 4
 
Введение в Windows Communication Foundation
Введение в Windows Communication FoundationВведение в Windows Communication Foundation
Введение в Windows Communication Foundation
 
Microsoft User Group Vinnitsya
Microsoft User Group VinnitsyaMicrosoft User Group Vinnitsya
Microsoft User Group Vinnitsya
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

ASP.NET 4.0 Cache Extensibility

  • 1. ASP.NET 4.0 Cache Extensibility  Stefan SchackowProgram Manager Microsoft Corporation PC41
  • 2. What's the current state? Why is it changing? How are we changing it? .NET Framework Caching
  • 3. A great in-memory object cache in ASP.NET Lots of configurable "knobs" Expiration policies Automatic scavenging behavior Before and after removal callbacks Extensible cache dependencies Output caching of ASP.NET content Pages Fragment caching of ASP.NET controls Donut caching with cache substitution Output caching of arbitrary HTTP response Current Cache Functionality
  • 4. In-memory cache has various constraints Object cache API exists in System.Web Awkward to use object cache outside of ASP.NET Common question: Why do I have to include System.Web.dll in my WPF/Winforms project? Not available in 3.5 SP1 Client SKU Caching is a "black box" Where can vendors and developers plugin? Memcached, Velocity, ScaleOut, etc… have no clean integration point available to them Output caching is completely opaque Each custom caching solution is a completely different API for developers to learn Why Make Changes?
  • 5. Proposed New Cache Functionality A new, extensible, object cache API in its own namespace and assembly Supports both client and server applications Can be made available on both desktop and client SKUs A factored version of the ASP.NET cache engine Extensible ASP.NET output caching Consistent APIs for programming against Disk-based output caches Custom object caches Cloud-based object caches Distributed object caches
  • 6. New 4.0 Cache Functionality Namespace System.Caching { In-memory Disk based Cache Windows Azure CacheProvider Distributed }
  • 7. New 4.0 Cache Functionality Namespace System.Caching { CacheItemPolicy (expirations, priority, callbacks) CacheItem Cache CacheItem CacheItem CacheDependency (Sql, Key-based, File) }
  • 9. New 4.0 Output Cache Functionality Namespace System.Web.Caching { Default.aspx In-memory Disk based Foo.ascx Windows Azure OutputCacheProvider Distributed }
  • 11. Core Versus Optional APIs Cache API is a "union" of common functionality Not all cache providers need to implement all features Core functionality for all providers Represented on CacheProvider base type Storing and retrieving a key-value pair Basic Add/Get/Set/Contains/Remove methods Named cache partitions Providers specialize by deriving from InMemoryCacheProvider OutOfProcessCacheProvider
  • 12. InMemoryCacheProvider Represents a provider running exclusively in a single app-domain Count of items in cache Sliding expirations Distributed caches usually can't synchronize sliding expiration values across multiple servers Cache dependencies (derivations of CacheDependency) Distributed caches may have no concept of dependencies Item removal callbacks (before and after removal) Distributed caches may not be able to call back to anything
  • 13. OutOfProcessCacheProvider Represents a provider that stores data outside of an app-domain Version-based updates (CacheItem.Version) Useful for caches that support optimistic concurrency Lock-based updates (CacheItem.LockHandle) If a cache supports pessimistic concurrency Get multiple items Saves multiple round-trips on fetches Query-tag metadata (CacheItem.QueryTags) Retrieving multiple cache items based on string tags
  • 14. "Velocity" Integration "Velocity" – codename for distributed cache created by the Sql Server team Planned "Velocity" integration points OutOfProcessCacheProvider implementation for object caching SessionStateStoreProviderBase implementation for ASP.NET session state Sidenote: Updates to session state API are planned in 4.0 to allow for more granular sets and gets. OutputCacheProvider implementation for ASP.NET output caching
  • 16. Migrating From Existing APIs System.Web.Caching.Cache Current plan is that it stays un-changed Might enable "opting-in" to using an object cache provider Requires developing a “shim” that can re-route calls to the new object cache provider layer Currently the “shim” is only in the “idea phase” ASP.NET output caching Both page and control caching can opt-in to using custom providers By default both types of output caching continue to use ASP.NET’s in-memory cache
  • 17. Migrating From Existing APIs ASP.NET control output caching <@OutputCacheoutputCacheProvider="…" /> ASP.NET page output caching Programmatically choose different providers Override a new method on HttpApplication HttpApplication.GetOutputCacheProviderName Custom page output caching supports: Absolute expirations File-based dependencies only Validation and substitution callbacks must be static
  • 19. Summary 4.0 Caching is all about extensibility! Both object caching and ASP.NET output caching will be pluggable New object cache APIs available for both client and full versions of .NET Framework
  • 20. Related Content Breakout Sessions/Chalk Talks PC21 – ASP.NET MVC PC30 – ASP.NET Dynamic Data PC31 – ASP.NET and Jquery PC32 – ASP.NET Ajax Futures PC33 – Microsoft Visual Studio: Easing ASP.NET WebDev PC41 – ASP.NET Cache Extensibility TL48 – Microsoft Visual Studio: Web Development Futures ES15 – Deploying Web Applications with Microsoft Internet Information Services 7.0 and the Web Deployment Tool
  • 21. Evals & Recordings Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com
  • 22. Please use the microphones provided Q&A
  • 23. © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.