Contact Data Encoding buffer breaks WP Rocket caching
-
Hi,
I’ve identified a conflict between CleanTalk’s Contact Data Encoding “Use the output buffer” option and WP Rocket’s page caching. Hoping to get guidance on the recommended configuration.
Behavior observed:
- With “Use the output buffer” ON: phone/email blur works correctly, but the caching plugin writes zero cache files for any page. Every request executes PHP fully, resulting in high TTFB (~1000ms).
- With “Use the output buffer” OFF: page caching works correctly (TTFB drops to ~150ms), but contact info on the site is unblurred.
Diagnostic detail: Logged the PHP output buffer stack at shutdown. CleanTalk’s encoder buffer sits between the caching plugin’s
Cache::maybe_process_buffer(outer) andOptimization::maybe_process_buffer(inner) layers. When CleanTalk’s buffer closes, the final HTML doesn’t propagate correctly to the outer buffer, so no cache file is written. NoDONOTCACHEPAGEconstant is set, no PHP session is started, no disallowed response headers are sent — the only blocker is the buffer nesting itself.Environment:
- CleanTalk Spam Protect (latest version)
- WP Rocket (latest version)
- Divi theme
- PHP 8.3 on nginx/Apache
Questions:
- Is there a page-cache-compatible mode for Contact Data Encoding that achieves the same visual blur without using a full-page output buffer (e.g. content-filter based, like
the_content)? - Is there a known-compatible configuration for CleanTalk + page caching plugins that preserves both the blur effect and caching?
Thanks in advance for any guidance.
You must be logged in to reply to this topic.