Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basket like class

Status
Not open for further replies.

Stunner01225

Technical User
Mar 13, 2002
150
GB
Hello,
I have created a class for storing and changing data; it is similar in design to a shopping basket. Most of my users are read-only and will therefore not need to use this class, so it is only users who have logged in (about 20%). Each logged in user will need to insatiate one. I have a few questions.
1. where would be the best place to store this object( it has the potential to be very large)
2. If I placed it in the user session variable would it be sent on the round trips to the user or stored at the server?
3. If I placed it in the cache would that be a solution or would each object overwrite the previous?
Thanks for any help.
 
Whichever way you do it, it will be executed and stored in memory as some point so you may have a problem depending on what you class as "very large".

I'll attempt to answer your questions but they do all seem to be asking the same thing really.

1) Depends on usage and size
2) It's stored on the server in memory
3) Each object would be added if you initiated a new instance of it each time, else it would be updated.

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Thanks ca8msm
If the session is stored on the server then that’s good enough for me. I had seen somewhere (and since lost) on the web a code sample where an object was placed in the cache with a session id, and I couldn’t fathom why.
Thanks for all your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top