Cache: Application or Session?

Discussion in 'ASP .Net' started by Greg Collins [MVP], Nov 8, 2004.

  1. I think I know the answer, but I need to be absolutely sure.

    Currently I'm using Cache.Insert() -- Is this an Application level or Session level Cache? As far as I can tell there's only 1 Cache object and it's Application level, but if I'm misguided on that, I want to make sure I'm using the Application Cache and not the Session Cache.

    Thanx again in advance!
     
    Greg Collins [MVP], Nov 8, 2004
    #1
    1. Advertisements

  2. Greg Collins [MVP]

    Karl Seguin Guest

    Greg:
    i have an article which discusses ASP.Net storage mechanisms at
    http://openmymind.net/DataStorage/index.html

    HttpCache is application level, however you could turn it into somewhat of a
    session level via the cacheKey:

    string cacheKey = "GetUserSettings:" + userId.ToString()

    at which point the cached information is specific to a user (although it's
    still accessible throughout the application)...

    Hope this helps,
    Karl
    --
    MY ASP.Net tutorials
    http://www.openmymind.net/


    "Greg Collins [MVP]" <Greg.Collins_AT_InfoPathDev.com> wrote in message
    I think I know the answer, but I need to be absolutely sure.

    Currently I'm using Cache.Insert() -- Is this an Application level or
    Session level Cache? As far as I can tell there's only 1 Cache object and
    it's Application level, but if I'm misguided on that, I want to make sure
    I'm using the Application Cache and not the Session Cache.

    Thanx again in advance!
     
    Karl Seguin, Nov 8, 2004
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.