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 ?