By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,871 Members | 2,444 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,871 IT Pros & Developers. It's quick & easy.

php script buffering

P: n/a
pdc
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
script.
Any idea?

Jul 4 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
pd*@email.it wrote:
I need a simple buffering method to cache PHP script-files to reduce
the number of db queries.
If you want to reduce the db queries cache the query result. You can
see the php adodb cache method : http://adodb.sourceforge.net/

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.

---
http://blog.deshot.com
http://www.deshot.com

Jul 5 '06 #2

P: n/a
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:
pd*@email.it wrote:
I need a simple buffering method to cache PHP script-files to reduce
the number of db queries.

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

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.

---
http://blog.deshot.com
http://www.deshot.com
Jul 5 '06 #3

P: n/a
Bagus wrote:
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:
>pd*@email.it wrote:
>>I need a simple buffering method to cache PHP script-files to reduce
the number of db queries.
If you want to reduce the db queries cache the query result. You can
see the php adodb cache method : http://adodb.sourceforge.net/

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.

---
http://blog.deshot.com
http://www.deshot.com

Have a look at Phunami :
http://www.phpgeek.com/pragmacms/ind...ain&cslot_1=11

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,
Juliette
Jul 6 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.