"Octavian Rasnita" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> I want to create an html cache of a page, like when that page is saved to
> the disk and let the visitors download that static page and not a dynamic
> one.
> Of course, a dynamic PHP program will load that static page and display
it,
> but without need to connect to databases, to make calculations, etc.
>
> The problem is that I don't know how to automaticly decide when it is the
> right moment to update the cache and this is very important.
> I get some data from a database and the PHP program doesn't know when the
> database gets updated by another program, so it cannot create the cache
for
> that page immediately.
> If I let the program check the database each time it is ran, this takes
some
> times, and it is like I would not use the cache at all.
>
> Is it possible to use that kind of cache I want? (meaning... a kind of
> static page saved).
>
> Thank you.
>
> Teddy

Hi Teddy,

take a look at PEAR's Cache_Lite:
http://pear.php.net/package/Cache_Lite

With this package you define a "lifetime" for each page. When this time has
passed a new cached file will automatically be created. Cache_Lite is
managing this for you.

Regards, Torsten Roehr



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

Reply via email to