Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Seperate cache variable for each instances of an application

Seperate cache variable for each instances of an application

Scheduled Pinned Locked Moved ASP.NET
helpquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    anujose
    wrote on last edited by
    #1

    in my application i am storing values in a cache variable.i want to retain the value till the application closes. it is coming correctly. the problem is when another user takes the same application cache variable is havingthe previous users cache value.can i create new instance of that cache variable? or any other method?..........

    D 1 Reply Last reply
    0
    • A anujose

      in my application i am storing values in a cache variable.i want to retain the value till the application closes. it is coming correctly. the problem is when another user takes the same application cache variable is havingthe previous users cache value.can i create new instance of that cache variable? or any other method?..........

      D Offline
      D Offline
      DavieL
      wrote on last edited by
      #2

      Hi, Do you mean each user is seeing the same cache contents & that's not what you want? If so place what user currently placing in the cache into the users session.

      A 1 Reply Last reply
      0
      • D DavieL

        Hi, Do you mean each user is seeing the same cache contents & that's not what you want? If so place what user currently placing in the cache into the users session.

        A Offline
        A Offline
        anujose
        wrote on last edited by
        #3

        i want to store large amount of data means dataset .that's why i am using cache variable.

        D 1 Reply Last reply
        0
        • A anujose

          i want to store large amount of data means dataset .that's why i am using cache variable.

          D Offline
          D Offline
          DavieL
          wrote on last edited by
          #4

          This may not be elegent but could you stick the dataset into the cache and use the datatable default view Rowfilter property to get the user specific stuff? private DataView getUserDataFromCache(string user) { DataView dv = Cache["Dataset"].Tables[0].DefaultView; dv.RowFilter="UserID='" + userid + "'"; return dv; }

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups