Hello!
I am in the process of rewriting an application that currently uses both session vars and a database to track certain user and application specific data.
My question is: which is the most efficient for managing this data? Currently the application sets session variables for a lot of the user based info and it goes to the database to get a lot of application specific info. It hits the database asking for this info on pretty much every single page and I can't help but wonder if there is not a better way to do it. However I don't want to throw ALL the data into session vars as I am afraid that would put too much stress on the server memory.
Would it be more efficient to write an XML file out when the user logs in and access that XML file to retrieve the needed data on each page? Or is that less efficient than going to the database? I've tried looking around for comparisons on the methods and have not been very successful.
Thanks,
-Greg
I am in the process of rewriting an application that currently uses both session vars and a database to track certain user and application specific data.
My question is: which is the most efficient for managing this data? Currently the application sets session variables for a lot of the user based info and it goes to the database to get a lot of application specific info. It hits the database asking for this info on pretty much every single page and I can't help but wonder if there is not a better way to do it. However I don't want to throw ALL the data into session vars as I am afraid that would put too much stress on the server memory.
Would it be more efficient to write an XML file out when the user logs in and access that XML file to retrieve the needed data on each page? Or is that less efficient than going to the database? I've tried looking around for comparisons on the methods and have not been very successful.
Thanks,
-Greg