How many DB results can we cache in Asp.net application? is there any limit
e.g if we cahce DataSet with 1000 rows data and we cache it through sqlCacheDependency.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You dont cache “DB reads”, you cache the result returned from a database call (ie SELECT statement, or a Stored Procedure execution).
Normally you would project this result into a strongly typed result set (such as
List<T>).It is this projected result set (object) that is cached.
As to where this is cached, as of ASP.NET 4.0 its up to you (as you can now specify custom cache providers).
In terms of a “limit” to the amount of data you can store the cache, there is no physical data limit, its a memory limit. The cache is stored in memory of the application pool for your ASP.NET website, this itself is a process (ASP.NET Worker Process).
Never seen a situation where it ran out of memory. Just be intelligent as to how/what you cache (cache objects together where possible) and you’ll be fine.