Caching.

Slides:



Advertisements
Similar presentations
Chapter 6 Server-side Programming: Java Servlets
Advertisements

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,
ASP.NET Best Practices Dawit Wubshet Park University.
Chapter 51 Scripting With JSP Elements JavaServer Pages By Xue Bai.
Overview  Introduction to ASP.NET caching  Output caching  Fragment caching  Data caching 1.
Using Patterns Examples Dr. Neal CIS 480. Singleton Pattern Concept Singleton Pattern: –For those situations when you only one object to be created from.
Online Magazine Bryan Ng. Goal of the Project Product Dynamic Content Easy Administration Development Layered Architecture Object Oriented Adaptive to.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 1 of…
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Microsoft ASP.NET: An Overview of Caching Holly Mazerolle Developer Support Engineer Microsoft Developer Support Microsoft Corporation.
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College
Chapter 33 CGI Technology for Dynamic Web Documents There are two alternative forms of retrieving web documents. Instead of retrieving static HTML documents,
ASP.NET and Model View Control Jesper Tørresø ITNET2 F08.
Microsoft ASP.NET: An Overview of Caching. 2 Overview  Introduction to ASP.NET caching  Output caching  Data caching  Difference between Data Caching.
State Management. What is State management Why State management ViewState QueryString Cookies.
Tracing 1www.tech.findforinfo.com. Contents Why Tracing Why Tracing Tracing in ASP.NET Tracing in ASP.NET Page Level tracing Page Level tracing Application.
Caching Chapter 12. Caching For high-performance apps Caching: storing frequently-used items in memory –Accessed more quickly Cached Web Form bypasses:
Chapter 6 Server-side Programming: Java Servlets
COMP3241 E-Business Technologies Richard Henson University of Worcester October 2012.
Christopher M. Pascucci Basic Structural Concepts of.NET Managing State & Scope.
Global.asax file. Agenda What is Global.asax file How to add the Global.asax file What are the default events available Explanation to Application_Level.
Building Applications using ASP.NET and C# / Session 15 / 1 of 17 Sessio n 15.
ASP.NET Caching - Pradeepa Chandramohan. What is Caching? Storing data in memory for quick access. In Web Application environment, data that is cached.
STATE MANAGEMENT.  Web Applications are based on stateless HTTP protocol which does not retain any information about user requests  The concept of state.
Module 7: Creating a Microsoft ASP.NET Web Application.
Efficient RDF Storage and Retrieval in Jena2 Written by: Kevin Wilkinson, Craig Sayers, Harumi Kuno, Dave Reynolds Presented by: Umer Fareed 파리드.
Server-side Programming The combination of –HTML –JavaScript –DOM is sometimes referred to as Dynamic HTML (DHTML) Web pages that include scripting are.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
Virtual techdays INDIA │ 9-11 February 2011 Caching Enhancement in ASP.NET 4.0 Abhijit Jana │ Consultant, Microsoft
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
WebObjects Matt Aguirre Lally Singh. What Is It? A Java based development platform specifically designed for database-backed web applications.
Ajax and the GWT. Ajax  Asynchronous JavaScript And XML  Technology behind interactive web sites  Provide smoother experience than conventional web.
Session, TempData, Cache Andres Käver, IT Kolledž
ASP.Net ICallback Vijayalakshmi G M Senior Trainer Binary Spectrum.
Module 5: Managing Content. Overview Publishing Content Executing Reports Creating Cached Instances Creating Snapshots and Report History Creating Subscriptions.
Introduction to ASP.NET, Second Edition2 Chapter Objectives.
PHP: Further Skills 02 By Trevor Adams. Topics covered Persistence What is it? Why do we need it? Basic Persistence Hidden form fields Query strings Cookies.
A Fragmented Approach by Tim Micheletto. It is a way of having multiple cache servers handling data to perform a sort of load balancing It is also referred.
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
Fundamentals of Web DevelopmentRandy Connolly and Ricardo HoarFundamentals of Web DevelopmentRandy Connolly and Ricardo Hoar Fundamentals of Web DevelopmentRandy.
© 2004 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Programming the Web Using ASP.Net Chapter 6: The User Interface (UI) Dave.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Eine By: Avinash Reddy 09/29/2016.
Managing State Chapter 13.
Architecture Patterns Design Patterns
Web Engineering CS-4513 Prepared By: Junaid Hassan Lecturer at UOS M.B.Din Campus
Processes and threads.
Building Web Applications with Microsoft ASP
Design by Contract Jim Fawcett CSE784 – Software Studio
Design by Contract Jim Fawcett CSE784 – Software Studio
C Interview Questions Prepared By:.
Caching Data in ASP.NET MVC
Session Variables and Post Back
Creational Pattern: Prototype
Singleton Pattern Command Pattern
ASP.NET Caching.
A Pentana Solutions Presentation
What is the Difference between AMP and PWA
MG4J – Managing GigaBytes for Java Introduction
O.S Lecture 13 Virtual Memory.
Lecture 1: Multi-tier Architecture Overview
AWS Cloud Computing Masaki.
ASP.NET Module Subtitle.
Building ASP.NET Applications
Lecture 5: Functions and Parameters
Active server pages (ASP.NET)
CREE: HEIRPORT lite Welcome screen:
Client-Server Model: Requesting a Web Page
ASP.NET and Model View Control
Presentation transcript:

Caching

Caching Caching can be used to temporarily store page output or application data either on the client or on the server, which can then be re-used to satisfy subsequent requests and thus avoid the overhead of re- creating the same information. Caching is particularly suitable when you expect to return the same information in the same format for many different requests. ASP.NET provides the following types of caching that can be used to build highly responsive Web applications: Output caching, which caches the dynamic response generated by a request. Partial Page caching, which caches portions of a response generated by a request. Data caching, which allows developers to programmatically retain arbitrary data across requests.

Output Caching Output caching caches the output of a page (or portions of it) so that a page's content need not be generated every time it is loaded. Considering the fact that the page does not change for a certain period of time, it is always a good idea to cache whatever is non- static so that the page can be loaded quickly. Add a new OutputCache page directive to the ASP.NET page: <%@OutputCache Duration="10" VaryByParam=“None" %>

Caching Application Data ASP.NET includes a full-featured cache engine that can be used by an application to store arbitrary objects in memory, which can then be retrieved by the same or any other page that is part of the application. This caching mechanism is implemented via the Cache class, an instance of which exists for each application configured on a Web server. The ASP.NET cache is private to each Web application, and its lifetime depends on the start and end of any given application. This means that only pages within an application domain can have access to its cache. When the application starts, an instance of the application's Cache object is created. When the application ends, its cache is cleared. The application cache provides a simple dictionary interface using key=value pairs that allow programmers to easily store and retrieve objects from the cache.

In the simplest case, placing an item in the cache is just like adding an item to a dictionary: Cache ( "mykey" ) = myValue Retrieving the data is just as simple: myValue = Cache ( "mykey" ) If myValue <> Null Then DisplayData ( myValue ) End If It is also possible to set the OutputCache on all the pages in an ASP.NET application programmatically in the Global.asax page. Refer to the code snippet that follows:– void Application_BeginRequest(object sender, EventArgs e) { HttpContext.Current.Response.Cache.SetCacheability(HttpCacheabilit y.Server); } The source code given in the above code snippet sets the cache ability programmatically in the BeginRequest event of the application’s global class.

Partial Page Caching Also known as Fragement Caching, this is a feature that allows specific portions of the web page to be cached rather than caching the entire web page and is useful in situations where a particular web page can contain both static and dynamic content. The term “fragment” implies one or more user controls in the web page. Note that each of these user controls can have different cache durations.