Hello,
It seems the problem is with Litespeed. When I disabled Litespeed, it works perfectly.
As a solution, I wanted to exclude RTL language caching from Litespeed but it doesn’t work.
/ar/(.*)
/iw/(.*)
/fa/(.*)
/ur/(.*)
But it still keeps caching those URLs.
https://www.kidsfashionturkey.com/ar/shop/gender-baby-girl/stock-status-instock/page/5
Plugin Support
qtwrk
(@qtwrk)
the gtranlaste may have cached the page, you need to disable it from their side as well
and remove (.*)
from your setting if you want to exclude cache from LiteSpeed side
/xx/
is enough , /xx/(.*)
won’t work
Hi. thanks for your reply. However this solution doesn’t work due to the structure of Gtranslate. The URL never matches. I have come with another solution.
function disable_litecache_for_rtl() {
if ( is_rtl() )
{
do_action( 'litespeed_control_set_nocache', 'nocache because rtl' );
//echo '<script>console.log("Cache disabled for this page")</script>';
}
else{
//echo '<script>console.log("Cache enabled for this page")</script>';
}
}
add_action( 'template_redirect', 'disable_litecache_for_rtl' );
Gtranslate.io already caches and serves from the cache so only disadvantage is optimization otherwise it works great.
- This reply was modified 16 minutes ago by miyojin.