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. ASP.Net Performance

ASP.Net Performance

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netperformance
4 Posts 4 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hi All, I am developing web application so certain thing i need to store in session variable like role id of user. Right now i am using

    Session["id"] =""

    should i use the following code or i can use

    Cache["var"] =""

    Is that effect performance of the application. Thanks and regards, Amit Patel

    A A 2 Replies Last reply
    0
    • L Lost User

      Hi All, I am developing web application so certain thing i need to store in session variable like role id of user. Right now i am using

      Session["id"] =""

      should i use the following code or i can use

      Cache["var"] =""

      Is that effect performance of the application. Thanks and regards, Amit Patel

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      Amit Patel1985 wrote:

      Session["id"] ="" should i use the following code or i can use Cache["var"] =""

      Session is Unique for each user. Whenever client send a request the session will kept in Server and its unique and can't be accessible for all. So you should store information that is related with current user in session like Username, id etc. Cache is global for. When all data need to share for all of the user you can use data caching. Like if you want to share global address to all users. Please let me know if you need more information on the same.

      Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

      1 Reply Last reply
      0
      • L Lost User

        Hi All, I am developing web application so certain thing i need to store in session variable like role id of user. Right now i am using

        Session["id"] =""

        should i use the following code or i can use

        Cache["var"] =""

        Is that effect performance of the application. Thanks and regards, Amit Patel

        A Offline
        A Offline
        Abhishek Sur
        wrote on last edited by
        #3

        Always place sensitive data in session.... (User Specific) Cache is accessible to all users. So Session is best choice on this regard. ;) If you dont put any large serialization types into Session variables.. There is no problem...

        Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


        My Latest Articles-->** Simplify Code Using NDepend
        Basics of Bing Search API using .NET
        Microsoft Bing MAP using Javascript

        F 1 Reply Last reply
        0
        • A Abhishek Sur

          Always place sensitive data in session.... (User Specific) Cache is accessible to all users. So Session is best choice on this regard. ;) If you dont put any large serialization types into Session variables.. There is no problem...

          Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


          My Latest Articles-->** Simplify Code Using NDepend
          Basics of Bing Search API using .NET
          Microsoft Bing MAP using Javascript

          F Offline
          F Offline
          farogh haider
          wrote on last edited by
          #4

          Hi, I agree with abhishake

          Farogh Haider Web developer

          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