C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Application Performance - Caching


Posted Date: 29 Aug 2008    Resource Type: Articles    Category: .NET Framework

Posted By: Nagarajan       Member Level: Gold
Rating:     Points: 10



Caching is one of the best techniques you can use to improve the application performance. you need to design in such a way that can improve the performance.

Where to cache:

When data being cached in persentation layer consider when it needs to be displayed and make sure the data is not cached on per-user level.
For example, displaying list of countries in a dropdown, you can look these up once from the database and then store them in the cache.

When data being cached in business logic level, you can use system applicaple data structures like hashtable or arraylist.
Consider caching in the business layer when the data cannot be efficiently retrieved from the database.
Data that changes frequently should not be cached.

Cache in database, when large amount of data is cached and also when it is needed to cache for a very long period.
Here, the data is cached in temporary tables which may consume more memory.
Make sure caching in database is improving or hurting the application performance.

Choose the cache location, depending on the scope of the cached object. If you need to cache data for lengthy periods of time, you
should use a SQL Server database. For shorter cache durations, use in-memory caches.

what to cache:
Do not cache per-user data, which may cause consume more memory, ex. caching a site level search results for every user. that's costly.

Cache frequently used, not frequently changing, data. It's of no use caching a frequently changing data.

Do Not cache shared resources like database or network connections, instead you can pool it.
Make all your changes to the data, before caching it.

# Happy Coder #




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Caching  .  Cache  .  Asp.Net Caching  .  Asp.Net  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Application Performance - Viewstate
Previous Resource: Generic Collections - Feature of DotNet 2.0
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

doors in nj

Contact Us    Privacy Policy    Terms Of Use