Go Back   Wiki NewForum > Career Forum (Documents/Tutorials/Advice) > Tech Forum & Tutorial > ASP.NET Forum & Tutorial

Sponsored Links

Reply
Views: 923 Source: CNN18.com, India-Forums, TellyChakkar, India, Times of India, Youtube, BollywoodLife, Rediff  
Thread Tools Rate Thread Display Modes
  #1  
Old 05-30-2009, 10:22 AM
bholus7 bholus7 is offline
Banned
 
Join Date:
Apr 2009
Posts: 1,322
Default ASP.NET caching technique - Interview questions

ASP.NET caching technique - Interview questions

Caching is defined as temporary storage of data for faster retrieval on subsequent requests. In ASP .NET 2.0, the caching support is integrated with the DataSource controls to cache data in a web page.
Question - Define Caching in ASP.NET.

Answer - Caching technique allows to store/cache page output or application data on the client. The cached information is used to serve subsequent requests that avoid the overhead of recreating the same information.

This enhances performance when same information is requested many times by the user.
Question - Advantages of Caching

Answer - It increases performance of the application by serving user with cached output.

It decreases server round trips for fetching data from database by persisting data in the memory.

It greatly reduces overhead from server resources.
Question - What are the types of Caching in ASP.NET?

Answer - Caching in ASP.NET can be of the following types
Page Output Caching
Page Fragment Caching
Data Caching
Question - Explain in brief each kind of caching in ASP.NET.

Answer - Page Output Caching
This type of caching is implemented by placing OutputCache directive at the top of the .aspx page at design time.

For example:
<%@OutputCache Duration= "30" VaryByParam= "DepartmentId"%>

The duration parameter specifies for how long the page would be in cache and the VaryByParam parameter is used to cache different version of the page.

The VaryByParam parameter is useful when we require caching a page based on certain criteria.

Page Fragment Caching
This technique is used to store part of a Web form response in memory by caching a user control.

Data Caching
Data Caching is implemented by using Cache object to store and quick retrieval of application data.

Cache object is just like application object which can be access anywhere in the application.

The lifetime of the cache is equivalent to the lifetime of the application.

Reply With Quote
Reply

New topics in ASP.NET Forum & Tutorial

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump


Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2018, vBulletin Solutions, Inc.