1

Topic: PHP accelerators/caches safe with PunBB?

Has anybody tried any server-side accelerators/cachers with PunBB yet? How well do they work?

Re: PHP accelerators/caches safe with PunBB?

Don't know sad

Re: PHP accelerators/caches safe with PunBB?

well i use htaccess to cache the content, and trust me it works. use this tool to see the page speed. although u will feel the difference yourself.

http://tools.pingdom.com/fpt/

here is my code, i added it in the main htaccess before the 'Punbb End':

# Expires Headers - 2678400s = 31 days
<ifmodule mod_expires.c>
  ExpiresActive On
  ExpiresDefault "access plus 1 seconds"
  ExpiresByType image/gif "access plus 2678400 seconds"
  ExpiresByType image/jpeg "access plus 2678400 seconds"
  ExpiresByType image/png "access plus 2678400 seconds"
  ExpiresByType text/css "access plus 518400 seconds"
  ExpiresByType text/javascript "access plus 2678400 seconds"
  ExpiresByType application/x-javascript "access plus 2678400 seconds"
</ifmodule>

# Cache Headers
<ifmodule mod_headers.c>
  # Cache specified files for 31 days
  <filesmatch "\.(ico|flv|jpg|jpeg|png|gif|css|swf)$">
  Header set Cache-Control "max-age=2678400, public"
  </filesmatch>
  # Cache Javascripts for 31 days
  <filesmatch "\.(js)$">
  Header set Cache-Control "max-age=2678400, private"
  </filesmatch>
</ifmodule>

<FilesMatch "\.(php)$">
    <IfModule mod_headers.c>
        Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
    </IfModule>
</FilesMatch>

    #The following lines are to avoid bugs with some browsers
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html 
MyFootballCafe.com  is Now Online!

4

Re: PHP accelerators/caches safe with PunBB?

I'm using nginx, so .htaccess won't work for me wink

I think .htaccess is Apache only, anyways.

I already have client-side cache'ing of images/css/js files, with the expiration set to "Max" so it stays there until the visitors clear their browser caches. I think I have more image file types being cached that you do.

I've already done research on how to optimize my speed and bandwidth, and the only thing I'm stuck on is if I can use a PHP accelerator with PunBB. I've read that those can mess with dynamic content, I'm just not sure if PunBB is too dynamic, or if there's some part that I can try to "accelerate".

5

Re: PHP accelerators/caches safe with PunBB?

I decided to give Xcache a try. As far as I can see, it is working quite well, and the start page on PunBB's admin panel detects that Xcache is being used. I can only assume from this, without looking at the code, that PunBB is setup to only allow static stuff to be cached by Xcache.

6 (edited by k0nsl 2012-10-21 05:43)

Re: PHP accelerators/caches safe with PunBB?

I've tried xcache and eAccelerator so far in different configurations and found no problems.

-k0nsl