Friday, June 20, 2014

Cache Aggressively – Performance Tips for ASP.NET Applications

Tip 3. Cache Aggressively

When designing Asp.net application, make sure you put all static pages in cache. You can cache data as well as pages/user controls. Asp.net 4.0 also providing extensible output cache through which you can put your cache on local or remote disks, cloud storage and distributed cache engines.

Caching makes significant performance improvement in your application.

You can cache data using application cache which provides a programmatic way to store data in memory using key/value pairs.

You can cache page using page output cache. Output caching enables you to store rendered HTML. You can cache a whole web page or just the output of Asp.net control.

An application can often increase performance by storing data in memory that is accessed frequently and that requires significant processing time to create. For example, if your application processes large amounts of data using complex logic and then returns the data as a report accessed frequently by users, it is efficient to avoid re-creating the report every time that a user requests it. Similarly, if your application includes a page that processes complex data but that is updated only infrequently, it is inefficient for the server to re-create that page on every request.

To help you increase application performance in these situations, ASP.NET provides caching using two basic caching mechanisms. The first is application caching, which allows you to cache data you generate, such as a DataSet object or a custom report business object. The second is page output caching, which saves the output of page processing and reuses the output instead of re-processing the page when a user requests the page again.

No comments:

Post a Comment

React-select is very slow on larger list - Found solution - using react-window

 I had more than 4000 items in searchable dropdownlist. I have used react-select but it was very slow. finally I found complete solution to ...