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?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| What are the Types of caching in dot net 2005? |
|
#2
| |||
| |||
| 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. |
|
#3
| |||
| |||
| How can you cache different version of same page using ASP.NET cache object? |
|
#4
| |||
| |||
| 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! |
|
#5
| |||
| |||
| Hi, Can u tel me, what is meant by caching in dot net 2005, where is it used? |
|
#6
| |||
| |||
| 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! |
|
#7
| |||
| |||
| 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 |
|
#8
| |||
| |||
| 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... |
|
#9
| |||
| |||
| 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 |
|
#10
| |||
| |||
| 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... |
![]() |
| Thread Tools | |
| Display Modes | |
| |
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 |
Our Partners |