Cache Or Session RRS feed

  • Question

  • User2070100822 posted


    I am trying to figure the best way to store my result data from sql, in memory.

    I have web garden scenario of 4 web servers, IIS 6, configured to use sticky session, .net 2 application use InProc.

    I want to know if it recommended to use session or cache with this  scenario?

    If using cache, i want to store data that not thread safe, are you suggest me to use SessionId as the key for each inserting/pooling data?


    Monday, February 8, 2010 4:28 AM


  • User541108374 posted


    I think you also need to take into the equation the difference between Cache and Session. Session is unique per user while Cache is the same for all users normally (you could make up the keys with which you insert into Cache depending on the User name but in that case you should ask yourself why you're not using Session state instead).

    In most applications I see Cache and Session being used both. Cache for more or less stale data like postal codes, country names, ... while Session's used for keeping short time information per user.

    Grz, Kris. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 8, 2010 4:39 AM