404 Tech Support

Utilize Memcache with your phpBB forum

One of the features introduced in phpBB 3.0.6 (back in November 2009) was the ability for phpBB to utilize other caching modules beyond its own file caching. phpBB is already quite fast for a dynamic web application that pulls its information from a database. If you have a large number of posts and a lot of users, you may be able to get even better performance by utilizing a caching plugin.

phpBB 3.0.6 and beyond (currently 3.0.10) support disabling caching completely, or using memcacheAPCXCache, and eAccelerator. If your server has one of these plugins installed, you can take advantage of this improved caching. You can ask your hosting (like WiredTree) or check for yourself with the PHP information page under the left column heading of General Tasks  on the System tab of your phpBB Administration Control Panel.

Since enabling the caching options, though easy, is meant for those webmasters with a bit of technical skill and tenacity, there is no easy configuration option in the ACP. Instead, you’ll need to edit the config.php file at the root of your forum. This file contains your database username and password information, so you will want to be careful with it.

One line in the file starts with $acm_type. By default, it will be set equal to ‘file’. You can change file to match the caching plugin you are using, upload the file, and test it out. I saw a bit of a snappier response once I enabled memcache but your mileage may vary and you may see better performance with a different caching plugin.

If your caching is installed with nondefault options like a different port or on a different server, you can configure the phpBB caching plugin by editing the files under rootincludesacm. Acm_memcache.php holds the necessary settings and the comments indicate where you should list your changes if necessary.

If you want to switch back to default phpBB handling, just update config.php again to set acm_type to ‘file’.