View Single Post
  #3 (permalink)  
Old October 5th, 2005, 07:10 PM
Redden Redden is offline
Registered User
 
Join Date: Oct 2005
Location: , Virginia, USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I thought the object Cache could only be used for the application and not the session

I do have some questions though.

First: What is meant by a session variable requiring a round trip to the server? I thought that the only way of storing data on the users computer was with a cookie and it had to be retrieved by the application and then sent back to the server with the new page essentially making a round trip. Isn't the Session state variable stored on the server? If so why would it have to make a round trip? Doesn't the server just fill in the new page with the data before it sends it.

The second question is about the Cache object, What are the benefits of using this instead of an application variable. Both are destroyed when the application ends. The only differences I can tell are the providing of datalocks for the cache object (which would only be needed if your application is updating the data) and the fact that an application variable is created on startup while a cache object is not created until the first time it is used. The Cache object would thus have more overhead because of the locks and the Cache management.

If there is more to it than that then I need to know because it could be something I need to look at it for the application I'm working on now.