php script buffering

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I need a simple buffering method to cache PHP script-files to reduce
the number of db queries. This method should work on a single php
script and not on the whole web-page generated. This because my portal
based on PHP-Nuke uses a big number of scripts used by inclusion and
each script need a refresh time different. For example the online
members list should be refreshed every 10 seconds, the news every 10
minutes and the articles every 10 houres...
The perfect solution should be to add in every script to be buffered a
PHP directive in the first line specifing the expire-time for that
Any idea?

Re: php script buffering wrote:
Quoted text here. Click to load it

If you want to reduce the db queries cache the query result. You can
see the php adodb cache method :

The php adodb will save the query and query result into file...if the
query match at cache...the result will be taken from the cache.


Re: php script buffering

Nice, but this means to modify all the scripts accessing database and I
that is a big challange since I have hundreds of scripts...
My idea was quite simple, just buffering the php output with a expire
time variable script by script...

lorento ha scritto:

Quoted text here. Click to load it

Re: php script buffering

Bagus wrote:
Quoted text here. Click to load it

Have a look at Phunami :

I haven't used it (yet), but had it tagged for a similar use.
Still.. you will probably still have to edit a number of if not all your  
scripts to include this one.

Good luck,

Site Timeline