PolyLang and DONOTCACHEPAGE
-
Hello,
I have a WP install which uses PolyLang to provide the infrastructure that allows us to run two sites off of one install (in a virtual sense) — the default is English on an English domain and the other a French translation on a ‘French’ domain.
The English version is cached normally and performs like lightning! The French pages however have a long TTFB because they are served uncached.
I believe this is because PolyLang needs to set a cookie on the translated site so that it can remember which language is selected. In order to do so, it sets the DONOTCACHEPAGE constant, thereby preventing the page from being cached.
If I could direct your attention to this page you’ll find a discussion kicked off by the author of the WP Rocket plugin. Whilst it is a different caching plugin, the issue appears to remain the same, and the solution (scroll right down to the bottom) looks equally portable.
I’d love to hear your thoughts on this and whether you will be able to roll a solution into a nearby update.
- The topic ‘PolyLang and DONOTCACHEPAGE’ is closed to new replies.