ASP.NET Caching.

Slides:



Advertisements
Similar presentations
Not like the State of Virginia. What is State in ASP.NET? Services (like web services) are Stateless. This means if you make a second request to a server,
Advertisements

Advanced SQL Schema Customization & Reporting Presented By: John Dyke As day to day business needs become more complex so does the need for specifically.
Current Popular IT I Pertemuan 10 Matakuliah: T0403/Current Popular IT I Tahun: 2008.
Application Generator Merrill Networking Services.
ASP.NET Best Practices Dawit Wubshet Park University.
Turners SharePoint Web Site How we did it. 2 Page Anatomy Custom Search Web Part Custom Search Web Part Data Form Web Parts Content Query Web Part HTML.
Caching MacDonald Ch. 26 MIS 424 MIS 424 Professor Sandvig Professor Sandvig.
Need for SOA database for storing SOA data Divya Gade Rejitha Rajasekhar.
Toolbox Mirror -Overview Effective Distributed Learning.
1 Chapter 12 Working With Access 2000 on the Internet.
PHP (2) – Functions, Arrays, Databases, and sessions.
Multiple Tiers in Action
ASP.NET Programming with C# and SQL Server First Edition
CSC 2720 Building Web Applications Database and SQL.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Chapter 9 Using Perl for CGI Programming. Computation is required to support sophisticated web applications Computation can be done by the server or the.
Microsoft ASP.NET: An Overview of Caching Holly Mazerolle Developer Support Engineer Microsoft Developer Support Microsoft Corporation.
IT533 Lectures Session Management in ASP.NET. Session Tracking 2 Personalization Personalization makes it possible for e-businesses to communicate effectively.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
Microsoft ASP.NET: An Overview of Caching. 2 Overview  Introduction to ASP.NET caching  Output caching  Data caching  Difference between Data Caching.
Chapter 8 Cookies And Security JavaScript, Third Edition.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
1 Maryland ColdFusion User Group Session Management December 2001 Michael Schuler
Caching Chapter 12. Caching For high-performance apps Caching: storing frequently-used items in memory –Accessed more quickly Cached Web Form bypasses:
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Christopher M. Pascucci Basic Structural Concepts of.NET Managing State & Scope.
ASP.NET State Management. Slide 2 Lecture Overview Client state management options Cookies Server state management options Application state Session state.
ASP.NET OPTIMIZATION. Why Optimize? $$$ Whether you build applications for customers or not, enhanced applications save money.
ASP.NET Caching - Pradeepa Chandramohan. What is Caching? Storing data in memory for quick access. In Web Application environment, data that is cached.
Slide 1 ASP Authentication There are basically three authentication modes Windows Passport Forms There are others through WCF You choose an authentication.
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Web Part Development Overview VITALE, CATURANO & COMPANY LTD SharePoint Developer Series – Web Part.
Chapter 4: Working with ASP.NET Server Controls OUTLINE  What ASP.NET Server Controls are  How the ASP.NET run time processes the server controls on.
PAGE DIRECTIVES. Page Directives  They are instructions, inserted at the top of an ASP.NET page, to control the behavior of ASP.NET pages.  So it is.
ASP.Net, Web Forms and Web Controls 1 Outline Session Tracking Cookies Session Tracking with HttpSessionState.
ASP.NET User Controls. User Controls In addition to using Web server controls in your ASP.NET Web pages, you can create your own custom, reusable controls.
Nikolay Kostov Telerik Software Academy academy.telerik.com Team Lead, Senior Developer and Trainer
Session, TempData, Cache Andres Käver, IT Kolledž
Module 5: Managing Content. Overview Publishing Content Executing Reports Creating Cached Instances Creating Snapshots and Report History Creating Subscriptions.
ASP.NET 2.0 Security Alex Mackman CM Group Ltd
ASP.net Course From Intermediate to Advance level By Arsalan Ahmed 3 Months Course Cell :
Introduction to ASP.NET, Second Edition2 Chapter Objectives.
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
This is the cover slide..
Table General Guidelines for Better System Performance
Introduction to Dynamic Web Programming
Client/Server Databases and the Oracle 10g Relational Database
Caching Data in ASP.NET MVC
State Management.
CSE-291 Cloud Computing, Fall 2016 Kesden
Writing Highly Available .Net Framework Applications
The Online Smith Family Recipe Program
Basic Web Scraping with Python
ASP.NET Application Framework
Software Architecture in Practice
Database Performance Tuning and Query Optimization
IIS.
MIS Professor Sandvig MIS 424 Professor Sandvig
Table General Guidelines for Better System Performance
ASP.NET Module Subtitle.
HTML5 and Local Storage.
ASP.NET 4.0 State Management Improvements – Deep Dive
Active server pages (ASP.NET)
Chapter 11 Database Performance Tuning and Query Optimization
MIS2502: Data Analytics MySQL and MySQL Workbench
PHP Forms and Databases.
Caching.
Inside the Database Engine
Presentation transcript:

ASP.NET Caching

Overview Caching Pages with the @OutputCache Directive Introduction to caching data with the Cache object

Why Cache? Simply put, we cache to But caching can Prevent redundant page creation Minimize database requests But caching can Increase memory usage A poorly designed caching system can lead to various types of attacks (denial-of-service)

Caching an Output Page (1) You add the @OutputCache directive to a page with a few attributes Duration indicates the number of seconds to cache the page varyByParam If set to none, cached output will not vary based on parameters Use multiple semicolon separated parameters to create cached pages for various parameter configurations Use * to vary cached pages for all parameter configurations

Caching an Output Page (2) The caching mechanism is quite sophisticated You can create cache dependencies to SQL tables The cached page can be stored in the server or on the client The HttpCachePolicy class is used to create custom cache rules

Caching an Output Page (Example) Cached page lasts for 60 seconds Vary the pages based on the value of the query parameter named employeeID <% @outpuctCache Duration=“60” VaryByParam=“employeeID” %>

Cache an Output Page (Advanced Features) It’s possible to cache parts of a page (page fragment) Refresh an AdRotater on each postback but cache the other parts of the page

Introduction to the Cache Object (1) It’s really a ‘replacement’ for the ASP.NET Application object It’s thread safe You to not need to explicitly lock critical code sections It’s configurable Cache objects can be configured to expire when you want them to Cache objects can be prioritized

Introduction to the Cache Object (2) Like the Application object, Cache objects don’t work outside the application domain Like the Application and Session objects, it’s maintained as a collection of key/value pairs We are caching specific data here rather than the entire page

Introduction to the Cache Object (3) The Cache object (sort of) works in a Web garden Each processor gets its own object Cache objects will likely vary from one processor to the next All the work is handled by ASP

Important Cache Members The NoAbsoluteExpiration field is used to force a cached item never to expire The NoSlidingExpiration field disables sliding expiration

Cache Dependencies When creating a cached item, that item might have a cache dependency The CacheDependancy object can represent a file, and array of files, or a directory