SlideShare a Scribd company logo
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

More Related Content

What's hot

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
Information Development World
 
Apache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip HanikApache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip Hanik
Edgar Espina
 
11g r2 flashcache_Tips
11g r2 flashcache_Tips11g r2 flashcache_Tips
11g r2 flashcache_Tips
Louis liu
 
Module Owb Advanced Features
Module Owb Advanced FeaturesModule Owb Advanced Features
Module Owb Advanced FeaturesNicholas Goodman
 
.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
aminmesbahi
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
BG Java EE Course
 
"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
Fwdays
 
Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On Concurrency
Rodney Barlow
 
Tomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance TuningTomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance Tuning
lovingprince58
 
.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
aminmesbahi
 
Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On Concurrency
Will Gage
 
Architecting Large Enterprise Java Projects
Architecting Large Enterprise Java ProjectsArchitecting Large Enterprise Java Projects
Architecting Large Enterprise Java Projects
Markus Eisele
 
Jsp servlets
Jsp servletsJsp servlets
Jsp servlets
Rajavel Dhandabani
 
Java troubleshooting thread dump
Java troubleshooting thread dumpJava troubleshooting thread dump
Java troubleshooting thread dump
ejlp12
 
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
Rossen Stoyanchev
 
Java Servlets
Java ServletsJava Servlets
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
ejlp12
 
Testing Web Apps with Spring Framework
Testing Web Apps with Spring FrameworkTesting Web Apps with Spring Framework
Testing Web Apps with Spring Framework
Dmytro Chyzhykov
 

What's hot (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
 

Similar to ASP.NET 4.0 Cache Extensibility

NCache 3.8 SP3
NCache 3.8 SP3NCache 3.8 SP3
NCache 3.8 SP3
wesnoor
 
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
 
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
 
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...
Acquia
 
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
Alachisoft
 
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...
ColdFusionConference
 
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...
Shailendra Prasad
 
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...
Impetus Technologies
 
Caching objects-in-memory
Caching objects-in-memoryCaching objects-in-memory
Caching objects-in-memory
Mauro Cassani
 
Microsoft Windows Server AppFabric
Microsoft Windows Server AppFabricMicrosoft Windows Server AppFabric
Microsoft Windows Server AppFabric
Mark Ginnebaugh
 
awergaezrg
awergaezrgawergaezrg
awergaezrg
elodiaevie
 
sakdjfhaksjfhaskjh
sakdjfhaksjfhaskjhsakdjfhaksjfhaskjh
sakdjfhaksjfhaskjh
elodiaevie
 
salkdjfhdjkghdfkjh
salkdjfhdjkghdfkjhsalkdjfhdjkghdfkjh
salkdjfhdjkghdfkjh
elodiaevie
 
aksdfhaskdjfhasdjkh
aksdfhaskdjfhasdjkhaksdfhaskdjfhasdjkh
aksdfhaskdjfhasdjkh
elodiaevie
 
askldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdf
askldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdfaskldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdf
askldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdf
elodiaevie
 
aergserga
aergsergaaergserga
aergserga
elodiaevie
 
sergaerwga
sergaerwgasergaerwga
sergaerwga
elodiaevie
 

Similar to 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
 

More from akrakovetsky

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

More from 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
 

Recently uploaded

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 

Recently uploaded (20)

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 

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.