XF 2.1 Enabling cache on 2 different installations on the same server causes error

Academic

Member
Hi everyone!

So when I enable backend cache on one installation and then on another one, both on the same server, the second one makes call for an add-on tat is not present on it, but on the first installation and throws an error: An exception occurred: [Exception] Could not find class {Custom addon namespace}\XF\Template\Templater when attempting to extend XF\Template\Templater in src/XF/Extension.php on line 174

When I disable the cache on the second one, it works fine.

I've tried Redis and APCu caches. The same issue for different add-ons. So the second installation tries to extend the add-on that does not present on it, but on the first installation.

Any thoughts?

Thanks in advance!
 

Mike

XenForo developer
Staff member
The more general solution is to change your cache namespace per XF install in config.php:

Code:
$config['cache']['namespace'] = 'name';
This is effectively a prefix on the IDs of things put in the cache to avoid conflicts. (It defaults to "xf" to avoid conflicts with other systems.)
 
Top