can Cached read only data hurt performance?

  • Thread starter Thread starter Julia
  • Start date Start date
J

Julia

Hi,

I have basic questions regarding ASP.NET site
I am going to use Microsoft application configuration block and I wonder

1.does caching read only data in the application can hurt performance when
multiple request arrived?
(multiple pages read the cached data)

2.Instead of caching the data inside the Application dictionary can I use a
static method in the Global class
which return the read only data?


Thanks in advance
 
1. Caching uses the memory (stores the objects there), so if you use caching
to store too many objects, you may have problems with that. But if multiple
pages read the same data, then your application will work much faster and
caching is a very good decision.

2. Why do you consider using Global.asax ? Principally using cache goes like
this - you call a method (GetMyValueFromCache), this method checks if MyValue
is in cache and if so - returns it. If no - it gets it (maybe from database),
adds it to the cache and returns it.

Hope that makes sense and helps!
Regards,
Kostadin Kostov
 
Back
Top