XF 2.2 Guest page caching vs. Database replication

nocte

Well-known member
Is it true, that with a database replication (MySQL master/slave setup) guest page caching does not work? And if that's true, is that behavior desired?

Looking at the XF core code it seems that the config.php option $config['db']['adapterClass'] = 'XF\Db\Mysqli\ReplicationAdapter'; brings a cookie named dbWriteForced with it. And this cookie prevents pages from being cacheable (i.e. XF\PageCache::isResponseSaveable() returns false).

XF v2.2.11.
 
Solution
For anyone running into similar issues, we narrowed this down to an add-on performing database writes on guest page requests (without -- XFDB=noForceAllWrite).
\XF\Repository\Thread::logThreadView appears to be without the noForceAllWrite which will probably cause issues when mixed with page caching.
 
Top Bottom