views:

44

answers:

3

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.

A: 

Cache where? In ASP.Net? It's up to how much memory you have set aside to caching, how you are caching the information, and how large your data sets are. More information is needed to give you a more accurate answer

phsr
+1  A: 

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.

RPM1984
A: 

The memory is your limit.

SiN