What is caching and when to use it?

Caching is a most important aspect of high-performance web application. Caching provides a way of storing frequently accessed data and reusing that data. Practically, this is an effective way for improving web application’s performance.

When to use caching

  • Use caching for contents that are accessed frequently.
  • Avoid caching for contents that are unique per user.
  • Avoid caching for contents that are accessed infrequently/rarely.
  • Use the VaryByCustom function to cache multiple versions of a page based on customization aspects of the request such as cookies, role, theme, browser, and so on.
  • For efficient caching use 64-bit version of Windows Server and SQL Server.
  • For database caching make sure your database server has sufficient RAM otherwise, it may degrade the performance.
  • For caching of dynamic contents that change frequently, define a short cache–expiration time rather than disabling caching.
Tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.