can Cached read only data hurt performance?

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,829
Latest member
PIXThurman

Latest Threads

Top