php script buffering

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pdc@email.it

    php script buffering

    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?

  • lorento

    #2
    Re: php script buffering

    pdc@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.

    ---



    Comment

    • Bagus

      #3
      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:
      pdc@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://www.deshot.com

      Comment

      • Juliette

        #4
        Re: php script buffering

        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:
        >
        >pdc@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 :


        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

        Comment

        Working...