Session ? Static ?
Date: Tue, 29 Jun 2004 21:49:26 -0800
All,
I have a function that returns data from my db as an array. To reduce the
times the script
has to access the db should I store the contents of the variable in a
session variable and
access it that way, or should I figure out how to set it and use it as a
static variable ?
I was thinking doing an isset on the session var, if exists, use it, if not,
hit the db and store the
session var. Also, the data that is stored in the db will not change too
often, my sessions will
expire way before that so I dont have to worry about "stale" data.
Ideas ?
Relevant Pages
- Re: Large array stored in session variable causes server to choke
... I read in a csv file with 60000 lines, and store the data to a local array. ... if I try to assign that array to a session variable it chokes. ... I assign to session var as so: ... (comp.lang.php) - Re: PassingObjectstoWebForms
... You can store the object into a Session var and pick it up in following ... Context.Itemsto store request specific info to pass to transferred pages. ... > I have an object that gets created when the first ASP.NET webform, ... > the web app, is opened. ... (microsoft.public.dotnet.framework.aspnet) - Re: Suggestions on storing shopping cart info
... But to perisist it using a session var doesn't using a List allow you to ... add and remove items in the cart? ... int> to store the ID of the purchased product along with the number of ... Store that to a session variable? ... (microsoft.public.dotnet.framework.aspnet) - Re: Suggestions on storing shopping cart info
... Store that to a session var? ... shop more, should I store this info in a session var? ... to keep track of what's in the cart, ... (microsoft.public.dotnet.framework.aspnet) - Re: Suggestions on storing shopping cart info
... should I store this info in a session var? ... Alternatively, if you want the customer to be able to save the cart and come back to it later, you should save it to a database... ... to store the ID of the purchased product along with the number of items purchased... ... (microsoft.public.dotnet.framework.aspnet) |
|