Issue with recent/new cache rule and WPML
-
Hi,
It seems there’s an issue with recent Cache rule (created by plugin) in combination with WPML (wpml cookie)
- Cookie name: wp-wpml_current_language (* this cookie seesm to be handled by Javascript)
With WPML cooke I’m geting Cf-Cache: DYNAMIC header for all pages (nothing is cached)
In the WPML settings, it states: “WPML will set a cookie with JavaScript that allows it to output the correct content for AJAX operations…”
- As this is added via JS, it should be possible to serve the cached page
(at least everything was working fine while using old cache rule as described here: https://gist.github.com/isaumya/af10e4855ac83156cc210b7148135fa2
I believe the problem is that new cache rule have this part: ‘… and not http.cookie contains “wp-“…’ which matches ‘wp-wpml_current_language’ cookie
- ‘old’ cache rule (described: https://gist.github.com/isaumya/af10e4855ac83156cc210b7148135fa2) doesn’t have that part (‘and not http.cookie contains “wp-“…’)
- in ‘old’ cache rule there’s part for cookie ‘wp-resetpass-‘ and that’s the only one cookie rule in old cache rule which starts with ‘wp-‘
- As workaround I changed ‘and not http.cookie contains “wp-“‘ to ‘and not http.cookie contains “wp-resetpass-“‘ and it seems that did the trick – cache is working again
I guess you have to adjust/fix cache rule created by plugin
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.