Major consideration in planning strategy is the appropriate utilization of Server resources. There is always a trade-off when it comes to the use of any kind of caching , every item is cached then less memory is available for the other resources but inturn caching improves the application performance.

 

Check the below table for the suggested use of caching at real time scenarios..

 

Real time Scenario

Suggested Caching Type

Why

The generated .aspx page stays the same, but there are several tables shown within the output that change regularly.

Fragment Caching

Cache the portions of the page that remain static to an extent. Also consider using Data caching for storing some individual objects also.

The generated .aspx page constantly changes.

Data caching

Use the Data caching for the objects to improve performance.

The generated .aspx page changes every few hours as information is loaded into a database through automated processed.

Output Caching

Use output caching and set the duration to match the frequency of the data changes.

 

Effective caching Strategies

 

Fragment Caching : Consider the following examples where Fragment caching can be applied.

 

  1. Any page that remains most static, with the exception of some data pulls. A way to implement Fragment caching is usage of user controls.

 

  1. Any data accessed very frequently between multiple pages within an application can be loaded into a user control and cached so that any page can access the cached data.

 

  1. Any page that is constantly updated, with the exception of some areas, should have those areas loaded into a user control and cached.

 

 

Output Caching: It is best used when an entire page needs to be cached. Consider the following examples where output caching can be applied.

 

  1. A semi static page with data pulled from multiple locations where the data is known not to change too frequently. An example is a Message board or Dash Board.

 

  1. A page which is very frequently accessed even if it contains no dynamic data

 

  1. A page that tends to take a long time to load due to its size and complexity.

Data Caching: It is used to cache data at the object level. Consider the following examples in specific to the Data caching.

 

  1. Any application with objects that tend to be slow-loading should be cached on first use and used from the cache thereafter.

 

  1. Objects that are frequently accessed from the multiple pages within an application should be cached for simple access from any page in the application.

 Happy Learning !!!

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish