Re: Persistent values between executions
| From: | Mike Mannakee | Date: | Tue, 11 Mar 2003 02:21:59 +0000 |
| Subject: | Re: Persistent values between executions | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-139072@lists.php.net to get a copy of this message | ||
Yeah, it's on linux. I had a similar thought. I figured, if no other
solutions came from the post, I could hard code the variables into a file,
and if I needed to update it, make it self updating. Like do a string
replace to add the new variables I need in the include file itself. Bit of
a pain, but once it's running it should be alright.
Mike
"Chris" <spam@bittersweet2.com> wrote in message
news:oprlulgrvzoldh07@news.php.net...
> On Mon, 10 Mar 2003 11:30:25 -0500, Mike Mannakee <mike@basementideas.com>
> wrote:
>
> > I have some sets of values that I have stored in several tables in a
> > mySQL
> > database. These don't often change, but are referenced on every single
> > page
> > view. While each call is quick, as a gross the load on the server is
too
> > high. I would like to know if there is a way to have these sets of
> > values
> > remain persistent in the server's memory between calls from browsers,
> > like
> > environment variables, to reduce the back and forth calls to mySQL. As
> > the
> > data from the calls are almost always the same, it would seem easier
this
> > way.
> >
> > Any thoughts? Comments? RTFM suggestions?
> >
> > Mike
> >
>
> Happen to be on a unix system? What you could do is have a particular
> script that will do your mysql call and output the variables in a another
> file. Then, have a cron job run that script however often you need to
have
> those variables updated.
>
> Another way you could do it is initialize the variables you need as
session
> variables if the user logs in (assuming you're using an authentication
> system), which will stay active as long as the user has a valid session.
>
> --
> Using M2, Opera's revolutionary e-mail client:
> http://www.opera.com/m2/