IT Community - Software Programming, Web Development and Technical Support

What are the Types of caching in dot net 2005?

This is a discussion on What are the Types of caching in dot net 2005? within the ASP and ASP.NET Programming forums, part of the Web Development category; What are the Types of caching in dot net 2005?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > ASP and ASP.NET Programming

Register FAQ Members List Calendar Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 07-25-2007, 02:50 AM
Archer Archer is offline
D-Web Programmer
 
Join Date: Jun 2007
Posts: 52
Archer is on a distinguished road
Question What are the Types of caching in dot net 2005?

What are the Types of caching in dot net 2005?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 07-25-2007, 02:51 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 881
kingmaker is on a distinguished road
Send a message via MSN to kingmaker
Default Re: What are the Types of caching in dot net 2005?

ASP.NET supports three types of caching for Web-based applications:
• Page Level Caching (called Output Caching)
• Page Fragment Caching (often called Partial-Page Output Caching)
• Programmatic or Data Caching
Output Caching
Page level, or output caching, caches the HTML output of dynamic requests to ASP.NET Web pages. The way ASP.NET implements this (roughly) is through an Output Cache engine. Each time an incoming ASP.NET page request comes in, this engine checks to see if the page being requested has a cached output entry. If it does, this cached HTML is sent as a response; otherwise, the page is dynamically rendered, it's output is stored in the Output Cache engine.

Partial-Page Output CachingPartial-Page Output Caching, or page fragment caching, allows specific regions of pages to be cached. ASP.NET provides a way to take advantage of this powerful technique, requiring that the part(s) of the page you wish to have cached appear in a User Control. One way to specify that the contents of a User Control should be cached is to supply an OutputCache directive at the top of the User Control. That's it! The content inside the User Control will now be cached for the specified period, while the ASP.NET Web page that contains the User Control will continue to serve dynamic content. (Note that for this you should not place an OutputCache directive in the ASP.NET Web page that contains the User Control - just inside of the User Control.)

Data Caching
Sometimes, more control over what gets cached is desired. ASP.NET provides this power and flexibility by providing a cache engine. Programmatic or data caching takes advantage of the .NET Runtime cache engine to store any data or object between responses. That is, you can store objects into a cache, similar to the storing of objects in Application scope in classic ASP. (As with classic ASP, do not store open database connections in the cache!)
Realize that this data cache is kept in memory and "lives" as long as the host application does. In other words, when the ASP.NET application using data caching is restarted, the cache is destroyed and recreated. Data Caching is almost as easy to use as Output Caching or Fragment caching: you simply interact with it as you would any simple dictionary object.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 08-07-2007, 02:15 AM
leoraja8 leoraja8 is offline
D-Web Sr.Programmer
 
Join Date: May 2007
Posts: 190
leoraja8 is on a distinguished road
Default Re: What are the Types of caching in dot net 2005?

How can you cache different version of same page using ASP.NET cache object?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 08-07-2007, 03:43 AM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 905
S.Vinothkumar is on a distinguished road
Default Re: What are the Types of caching in dot net 2005?

Output cache functionality is achieved by using “OutputCache” attribute on ASP.NET page header. Below is the syntax.

<%@ OutputCache Duration="20" Location="Server" VaryByParam="state"
VaryByCustom="minorversion" VaryByHeader="Accept-Language"%>

VaryByParam :- Caches different version depending on input parameters send
through HTTP POST/GET.

VaryByHeader:- Caches different version depending on the contents of the
page header.

VaryByCustom:-Lets you customize the way the cache handles page variations
by declaring the attribute and overriding the GetVaryByCustomString handler.

VaryByControl:-Caches different versions of a user control based on
the value of properties of ASP objects in the control.
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 08-07-2007, 04:45 AM
krishnakumar krishnakumar is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 200
krishnakumar is on a distinguished road
Default Re: What are the Types of caching in dot net 2005?

Hi,
Can u tel me, what is meant by caching in dot net 2005, where is it used?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 08-07-2007, 05:29 AM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 905
S.Vinothkumar is on a distinguished road
Default Re: What are the Types of caching in dot net 2005?

Hi buddy...,

Caching is an important concept in computing. When applied to ASP.NET, it can greatly enhance the performance of your Web applications
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 08-08-2007, 01:23 AM
krishnakumar krishnakumar is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 200
krishnakumar is on a distinguished road
Default Re: What are the Types of caching in dot net 2005?

Hi guys,

I got an idea about cache in dotnet... Now i want to know about Cache Callback in Cache... Can anyone clear me....
__________________
Krishnakumar.S
Beware of Everything -that is un true; stick to the Truth shall succeed slowly but steadily
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 08-08-2007, 06:07 AM
a.deeban a.deeban is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 278
a.deeban is on a distinguished road
Default Re: What are the Types of caching in dot net 2005?

Hi,


can you ask your task little more specific. like which type of caching you are going to use, and where you struck in.


thanks...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old 08-08-2007, 06:47 AM
amansundar amansundar is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 319
amansundar is on a distinguished road
Default Re: What are the Types of caching in dot net 2005?

Cache object is dependent on its dependencies example like file based, time based etc...Cacheitems remove the object when cache dependencies change.i think ASP.NET provides capabilityto execute a callback method when that item is removed from cache.
__________________
cheers
Aman
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old 08-10-2007, 02:12 AM
a.deeban a.deeban is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 278
a.deeban is on a distinguished road
Default Need Help ,for user specific Cache...

I need help for user specific Cache...

We have a web application, where we use the session to store the user specific
data,and also we have datagrids which has paging and using Dataset stored in
session.since these dataset r holding large amount of data ie about 1000 recs min ,
and v have such datagrids throught the application ,according to the customer
request.

We r planning to replace the session object by Cache object. since all these
data are user specific, and the Cache object is of Application scope,Can u suggest
me the methods the keep these cache items user specific.

I planned to concatnate the session id with the cache item name,so when accesed the cache item created by the user will be unique.
Is there any other method to make cache items user specific.


thnx...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Explain how Caching in Asp.net 2.0 is different from Caching in Asp.net 1.1? Arun ASP and ASP.NET Programming 6 09-19-2007 09:15 PM
Caching in php abhilashdas PHP Programming 1 08-06-2007 10:42 PM
How many types of authentication modes are there and what are the Types.... Archer ASP and ASP.NET Programming 1 07-25-2007 02:48 AM
How caching will help to improve the performance of asp .net application? kingmaker ASP and ASP.NET Programming 1 07-20-2007 05:32 AM
ASP Caching nhoj ASP and ASP.NET Programming 0 04-09-2007 08:12 AM


All times are GMT -7. The time now is 12:49 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0