Re: cache/session/application, do these share memory?

Tech-Archive recommends: Fix windows errors by optimizing your registry



codefragment@xxxxxxxxxxxxxx brought next idea :
Hi
I understand there are different places to store session info. I'm
only concerned with inproc.

(1) Do the cache, session and application objects store their
information in the same place? I gather theres a limit of 60% of
physical memory that can be used before recycling but is that shared
between them?
In my head you have to keep session info. Cache info (which is
something I've never really played with) is info
that can be thrown away as you can regenerate it, so it doesn't make
sense to me that the application could restart and session discarded
because of excessive cache use.

(2) Any good articles out there on architectural patterns for large
scale/web farmed scenarios. What I'm ideally after is something that
discusses how the session/application/cache objects should be used in
practice. Saying, "use these minimally" doesn't help me a lot.

(3) Last thing, can you use the static keyword in asp.net? I thought
you couldn't and was surprised to see its use advocated over the
application object, not that i'm sure how either would be used for a
web farm.

thanks for any help

Session could use SqlServer or a StateServer (which can be used in a garden/farm scenario), Cache and Application use only server memory.

There is a difference:
Session is user-specific.
Cache and Application are application-wide.

Cache can throw out objects that are used infrequently (when memory gets low) or based on other criteria, Application can not.

You *can* use static variables in an asp.net application, but the values are application-wide, so do not store user-specific data in a static variable.

Hans Kesting


.



Relevant Pages

  • Re: Session VS. Cache
    ... Session is user specific. ... You don't want to store your dataset there unless ... I'm pretty sure there's functionality built into the Cache object that lets ... > in the Cache if I have to worry about the system purging it. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ViewState, Application, Session....
    ... viewstate and as a part of Request pipeline the framework initializes the ... Session: Session is a storage area that is specific to one user. ... there are times when session provides a good way to store user specific ... Application or Cache: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Session VS. Cache
    ... When is it better to store a small amount of data (say a very small DataSet ... or a couple of short string variables) in the Session vs in the Cache ... in the Cache if I have to worry about the system purging it. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Caching and cookieless sessions
    ... The problem is that I have an adapted version which is supposed to store the FormsAuthenticationTicket in a cache. ... Any ideas how to get the Session object in this function or how to store something in the Application object with a timeout. ...
    (microsoft.public.dotnet.general)
  • Re: How best to use php5 objects between pages?
    ... > or cache storage (PHP-APC cache can provide this, ... 1.He can use APC cache instead of dealing shared memory by himself. ... session files or databases. ... Session files are relatively secure. ...
    (comp.lang.php)