Application Class vs Cache Class

  • Thread starter Thread starter PenguinPig
  • Start date Start date
P

PenguinPig

I have googling some page, and it hasn't mention the resource usage of the
server in Application class and Cache class, which one consume more server
resource?

Thanks
 
Hello PenguinPig,

Could u explain what do u mean with "Application class and Cache class" ?

P> I have googling some page, and it hasn't mention the resource usage
P> of the server in Application class and Cache class, which one consume
P> more server resource?
P>
P> Thanks
P>
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch
 
Hi Michael

In my concept
We can using Application["var1"] or Cache["var1"] to store the data, which
as long as the application live.
But for Application and Cache, which consume more server resource?

Thanks

PenguinPig
 
The application class is a liitle more light weightin itself as it in simply
class that inherits namevaluecollectionbase. The Cache object can support
expireation and things like that which make it a little more heavy weight.
I don't think there is any noticable difference in use for just storing an
Item as they are both going to be instatiated in memory already so the only
new memory allocation would be for item itself in the application and for a
cacheentry object containing the item in the Cache.
It would be helpful to know more about the granularity you are looking for.

Bottom line answer is that the Cache uses more memory from what I can see.

HTH

Ciaran O'Donnell



PenguinPig said:
Hi Michael

In my concept
We can using Application["var1"] or Cache["var1"] to store the data, which
as long as the application live.
But for Application and Cache, which consume more server resource?

Thanks

PenguinPig

Michael Nemtsev said:
Hello PenguinPig,

Could u explain what do u mean with "Application class and Cache class" ?

P> I have googling some page, and it hasn't mention the resource usage
P> of the server in Application class and Cache class, which one consume
P> more server resource?
P>
P> Thanks
P>
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
Why are u worring about resources when select the class to state you data?

The selecting of the state class usually depends on the features of this
class. Cache is more robust and powerfull over Application.
Both of them use internal structures to keep data, and difference should not
be valued .
Application uses NameObjectCollectionBase class and Cache uses CacheEntry
class

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche




PenguinPig said:
Hi Michael

In my concept
We can using Application["var1"] or Cache["var1"] to store the data, which
as long as the application live.
But for Application and Cache, which consume more server resource?

Thanks

PenguinPig

Michael Nemtsev said:
Hello PenguinPig,

Could u explain what do u mean with "Application class and Cache class" ?

P> I have googling some page, and it hasn't mention the resource usage
P> of the server in Application class and Cache class, which one consume
P> more server resource?
P>
P> Thanks
P>
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 

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

Back
Top