What is caching and types of caching.


=> High performance web application should be designed with caching in mind. Caching is the technique of storing frequently used items in memory so that they cab be accessed more quickly.

Types of caching.

1. Page Output caching.
2. Page Fragment caching.
3. Data caching.

1. Page Output caching :-
             This type of caching is implemented by placing output cache directive at the top of the aspx page at design time.

Example

<%@outputcache Duration="30" VaryByParam="DepartmentID"%>

            The duration parameter specifies for how long page would be in cache and the VaryByParm parameter is used to cache different version of the page.
            The VaryByParam Parameter is used when we required caching a page based on certain criteria.

2. Page Fragment caching :-
             This technique is used to store part of a web form response in memory by caching a user control.

3. Data caching :-
              Data caching is implemented by using cache object to store and quickly retrieval of application data. Cache object is just like application object which can be access any where in the application. The life time of the cache is equivalent to the life time of the application. 

Share

& Comment

0 comments:

Post a Comment

 

Copyright © 2019 HART™ is a registered trademark.