You could use output buffering to write a static page of the results.

You basically turn on output buffering at the beginning of the script,
process as normal, and at the end, grab everything in the buffer, write it
to disk, then use header() to direct the person to that page.

Make a cron script that deletes old files periodically.

---John Holmes...
----- Original Message -----
From: "Dan Hardiker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, May 02, 2002 6:03 AM
Subject: Re: [PHP] Opinions Wanted


> There are quite a few ways of doing this.
>
>  1. Get MySQL to do the caching for you, using temporary tables.
>  2. Get something like the Zend Cache to handle it transparently
>  3. Use a global session (which everyone shares, or just specific groups
of
> people) which you can embed data in
>  4. Use a ramdisk / mfs partition to store "hard copies".. if they are
only
> updated once a day, then disk I/O is unlikely to be a problem.
>  5. Use shared memory to expand on number 3
>
> The key questions you need to ask yourself are:
>
>  1. Whats the scope of the caching? eg: per use, per page, per website...
>  2. Whats the TTL (time to live) on the cache? eg: 5 mins, 5 visits, 5
> hours, 5 days...
>  3. Whats being cached? eg: MySQL results, processed results, derrived
> information...
>
> The answer to those questions will help you determine which one of the 5
> options (there are ones other than the ones listed btw) you require.
>
> --
> Dan Hardiker [[EMAIL PROTECTED]]
> ADAM Software & Systems Engineer
> First Creative Ltd
>
> > Just a general question of the best way to do it !
> > I've got a job search site with mysql at the back of it !
> > You choose on the first page - type of job, where and other bits,
> > go to the next page where query is done and then lists the jobs
> > available!
> >
> > Whats the best way of keeping this page temporarily in existence ??
> >
> > I don't want the query to run every time when they have changed no
> > information and I don't want the Warning Page has expired please
> > re-submit details when the reload the page !
> >
> > At the moment I'm thinking I can create a temporary static version of
> > the page ?
> > but would like to here some other opinions about it !
> >
> > Thanks
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to