Menu

Page cacheing cannot be deterred

Help
2003-02-25
2012-10-11
  • Jeffrey Bonevich

    I am running phpwiki-1.3.4 on apache-2.0.44 and php-4.3.1.  I have added an alias and corresponding Directory section to my httpd.conf file in which I proceed to set all kinds of headers and expires:

    Alias /genwiki  /usr/local/apache2/htdocs/phpwiki/index.php
    <Directory "/usr/local/apache2/htdocs/phpwiki/">
        Options MultiViews FollowSymLinks
        AllowOverride None
        AcceptPathInfo on
    #
    # Do not cache wiki pages!
    #
        ExpiresActive on
        ExpiresByType images/gif "access plus 1 week"
        ExpiresByType images/jpg "access plus 1 week"
        ExpiresByType images/png "access plus 1 week"
        ExpiresDefault "now plus 0 seconds"

        Header add Expires "Fri, 30 Oct 1998 14:19:41 GMT"
        Header add Cache-Control "max-age=0, must-revalidate, no-cache"
        Header add Pragma "no-cache"

        Order allow,deny
        Allow from all
    </Directory>

    I have also confirmed that these headers are being set in pages served up by phpwiki via telnet to port 80.

    Is there some esoteric phpwiki or php thing I am missing?  Do I need to hack into the templates for pages to specify META tags etc. for cache control?

    jeff

     
    • Geoffrey T. Dairiki

      I don't completely understand.  What are you trying to accomplish, and what is not working?  (You say you have confirmed the headers are being set.)

      That said, I believe 1.3.4 sets a bogus (bad format, wrong timezone) Last-Modified header with no other cache-control headers.  (I've changed that, and the current CVS version of PhpWiki handles the cache control a bit more intelligently on it's own.)  (I.e. this is in a state of flux still.)

      You might try either upgrading to current CVS code,
      or grepping for and commenting out the lines
      which set Last-Modified in the PhpWiki source.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.