How i do use Catching pls send with Example.
Thanks&Regs
Magesh.A
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SenthilkumarPosted Mar 24, 2012, 11:05 PM
The caching is a mechnanism where it caches the paging, portion of paging or caching data in the client/server memory.
The subsequent request call will utilizes the cached memory to retrieve the data as response.
This is one the technique to increasing performance in the web application.
There are several types of caching:
- Output caching
- Fragment caching
- Data caching
Output caching:
The output caching is page level caching and if we have the static page which need not be requested and processed in the server. It will fetches from the memory.
ASP.Net has the OutputCache directive.
<@OutputCache Location="Any" Duration="seconds" VaryByParam=""/>
It can cache the data in the specified location like client/server/Any.
The duration can be set and with in the duration of cached data always retrieve from the cached memory.
It can cache the data by the versions based on the param.
Fragment Caching:
The Fragment caching is cache the portion of web page which not required frequently to load from the server.
When we have the user control like Header, Footer, Menus then same concept of outputcache directive cache has to be implemented in the user control.
Data Caching:
The data caching is a technique to cache the data across the pages. It can cache the data in the specified time.
The caching expiration policy can be set to the data.
Cache["Users"] = dtUsers;
It uses the key and value combination. Where the key should be unique and value can be based on that.
Satyapriya NayakPosted Mar 23, 2012, 5:16 AM
Caching is a technique widely used in computing to increase performance by keeping frequently accessed or expensive data in memory. In context of web application, caching is used to retain the pages or data across HTTP requests and reuse them without the expense of recreating them.ASP.NET has 3 kinds of caching strategiesOutput CachingFragment CachingData
CachingOutput Caching: Caches the dynamic output generated by a request. Some times it is useful to cache the output of a website even for a minute, which will result in a better performance. For caching the whole page the page should have OutputCache directive.<%@ OutputCache Duration="60" VaryByParam="state" %>
Fragment Caching: Caches the portion of the page generated by the request. Some times it is not practical to cache the entire page, in such cases we can cache a portion of page<%@ OutputCache Duration="120" VaryByParam="CategoryID;SelectedID"%>
Data Caching: Caches the objects programmatically. For data caching asp.net provides a cache object for eg: cache["States"] = dsStates;
Please refer the below links
http://www.c-sharpcorner.com/UploadFile/vishnuprasad2005/ImplementingCachinginASP.NET11302005072210AM/
ImplementingCachinginASP.NET.aspx
http://www.codeproject.com/Articles/6158/Caching-in-ASP-NET
http://www.aspnet101.com/2010/07/asp-net-caching-tutorial-part-1/
Thanks