What is the difference between cache and session in asp.net




















Read the link.. It can be both sides depends if its client side cache or server side cache for improving server performace. Yes there is another one as well called Application state management and is similar to cache except that cache is more like a hashtable with key-value pairs.

I'm glad I went with Session for my dataset. Since Application State is similar to Cache but has more funtionality, does that mean Application State will be obsolete in the future? It can be used for many things like Globals. Check out this wonderful link. The content you requested has been removed. Ask a question. Quick access. Search related threads. Remove From My Forums.

Answered by:. Archived Forums. State Management for ASP. Cache wont maintain any state, whereas Sessions will maintain separate state for every user. Next : What are different types of caching using cache object of ASP. Net Interview Questions Part-1 Asp. Net tracing Passing values between Asp.

Difference: Response. Write and Response. Write How many web. What is Protected Configuration in asp. Static variables, what is their life span? NET Session? What does mean Stateless? What are different types of caching using cache object of ASP. Which method is used to remove the cache object? How many types of Cookies are available in ASP.

What is the code behind and Inline Code in Asp. What is master page in ASP. Can you change a Master Page dynamically at runtime? Create a ISessionIDManager, since you only want to change the cookie domain we will let the default one do all the work.

This is configured in web. You would use the cookie[] format when the information you want to store is not bound to the session, e. You would use the session[] format when you want to store information that is related to the current session, e. There's a good benchmarks the DevOps Guys.

AppHarbor also recommends memcached, but doesn't have a benchmark. Asked 5 Months ago Answers: 5 Viewed 69 times. Should I instead use cache or cookies or some combination for this? Also when there is some error in the app, the session-object resets itself and I get more problems because of that I'm mostly doing desktop-programming and feel I lack lots of knowledge here so anyone who can expand on where to use Cache, Session, Cookies or db would be appreciated Edit: From the answers it seems that a combination of DB and cookies is what I want.

I have to store the booking in the database connected to a session-id Store the session-id in a cookie encrypted.

Every page load checking the cookie and fetch the booking from the database I have a clean-up procedure that runs once a week that clears unfinished bookings. Have I got it right? And thanks for great explanations to all of you!



0コメント

  • 1000 / 1000