C
CW
My asp application currently does not rely on session state at all, and I
have turned it off.
The function that I need to implements include a customer specific price
list. I am thinking of cacheing the price list (which is different for each
customer) in session variables rather than retrieving a copy of the customer
price list each time.
On one hand, with the database approach, each time a customer browses a
price list, it entails not only a round trip to the server, but also a round
trip access to the database server. On the other hand, with the session
state approach, if the same customer goes to a different page, and then
comes back to the price list url, the page can loads information directly
from cache stored in session.
Which approach is better?
have turned it off.
The function that I need to implements include a customer specific price
list. I am thinking of cacheing the price list (which is different for each
customer) in session variables rather than retrieving a copy of the customer
price list each time.
On one hand, with the database approach, each time a customer browses a
price list, it entails not only a round trip to the server, but also a round
trip access to the database server. On the other hand, with the session
state approach, if the same customer goes to a different page, and then
comes back to the price list url, the page can loads information directly
from cache stored in session.
Which approach is better?