Freelance Jobs

Caching And Types of Caching in ASP.NET

Friend Today again I am Here To Describe Caching in ASP.NET

CACHING:-

Caching is a technique used in computing to increase performance by keeping frequently accessed or expensive data from the memory.

The data stored in the cache memory is fast to retrieve because it does not reprocess.
Normally in the website, the developers keep home page in the cache because in the home page heavy pics are stored.


TYPES OF CACHING:-

1)Output Caching.
2)Fragment Caching
3)Data Caching
a.)File Dependency.
b.)Key Dependency.
c.)Time Dependency.


1)Output Caching :- It is used to store the whole page in the cache. Output cache depends on the duration. It may be parameterized.

2)Fragment Caching :- Store page fragment wise. We achieve fragment cache with the help of WebUserControl. In this caching, whole of the page is not cache just a small information is store in cache. For example we place an image in the WebUserControl and in the WebUserControl source page we specify the duration of cache and after that we drop WebUserControl in the .aspx page.





3)Data Caching :- It always use with database. For eg. DataSet store in cache.

a.)File Dependency :- Cache depends of the file not on the duration. If the file change then cache automatically destroy.

b.)Key Dependency :- Cache depends on the keys. One cache depends on the another cache (actually cache makes keys).

c.)Time Dependency :- We have two ways for Time Dependency caching.

i)Absolute :- Fix Time (4 hrs 2 mins).

ii)Sliding :- It slide the cache time if any end user perform some operation in the specified cache time. For eg. If we make cache for 10 mins, and after 5 mins end user access the page then this cache again slide for 10 mins( means it again set for 10 mins for cache).

----------------------------------------------------------------------------------------------------------------------------------------------------------------

New Feature in ASP.NET 2.0



1) Cache Profile :- We can create common cache profile in Web.Config file. In version 1.0 if we have to change the duration of cache time then we have to go each HTML source page and changes made but with the help of Cache Profie, we just have to change in the Web.config for the duration of cache time, the result will be occurs on every page.

2) Post Cache Subsitution :- In this case, whole page in cache just some information is post back to the server. It is totally opposite from fragment cache.

-----------------------------------------------------------------------------------------------
------------------------------

SqlCacheDataInvadation :- Direct connectivity of cache to sqlserver.
For eg. Category table-- make dataset--store in cache
Change in category automatically change in cache.

0 Comments:

Post a Comment



ONLINE JOBS