Performance Issue In Caching Large Amounts of Data

I have a .NET application that will need to make quite a few calls the database based upon users interaction.

I'm quite concerned with the number of times the database will be hit with user interactions, so I have decided to cache the data stored in the database (around 3500 records) into .NET cache. So I am querying my data though a generic list using LINQ within the application.

What I have noticed is that when the cache expires, the website takes a long time to load whilst the cache is populated with data.

Is there a better and more efficient way to cache large amounts of data whilst minimising calls to the database?
Who is Participating?
Jacques Bourgeois (James Burger)Connect With a Mentor PresidentCommented:
Do you really need to cache the 3500 records? If the users consult them one at a time, keeping them all in memory is overkill. Hitting the database each time a user needs a record might be better.

Or balance the thing as Amazon does. From what I learned about their system, it seems that they keep in cache only the items that are hot sellers and that they know will be requested repetitively during a given period of time. For any other item, they retrieve it from the database each time it is requested.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.