 Carlos Rojas
WPML Supporter since 03/2017
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/Madrid (GMT+02:00)
|
Great!
|
 rhettY
|
There is a setting in litespeed cache -> cache -> advance: AJAX Cache TTL.
In LS documentation, it says
"Specify an AJAX action in POST/GET and the number of seconds to cache that request, separated by a space. One action-TTL pair per line."
I can set the action to TTL 0, then it's not cached.
Please provide the ajax action name
|
 rhettY
|
Hi Carlos,
Please check this thread: https://wordpress.org/support/topic/admin-ajax-php-cache-2/#post-18659351
|
 Carlos Rojas
WPML Supporter since 03/2017
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/Madrid (GMT+02:00)
|
Hi,
Thank you for your messages.
I have asked our 2nd-tier specialists to read the ticket you shared, and I'm waiting for their response.
|
 Carlos Rojas
WPML Supporter since 03/2017
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/Madrid (GMT+02:00)
|
This ticket has been moved to our compatibility team so our compatibility specialists can take a deeper look and isolate the cause of the issue with LS cache.
I will keep you updated on the evolution of this ticket.
|
 Carlos Rojas
WPML Supporter since 03/2017
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/Madrid (GMT+02:00)
|
Hi there,
Please follow these steps:
- Create a full site backup
- Add this code to the functions.php file located within the active theme folder:
// Use Cookie instead of WCSession
add_filter( 'wcml_user_store_strategy', function ( $strategy, $key ) {
return 'cookie';
}, 10, 2 );
- Save the changes
- Go to LiteSpeed Cache -> Cache -> Advanced -> Vary Cookies -> add wcml_client_currency
- Save the changes
- Flush all the cache memory
- Double-check if the issue has disappeared
Can you tell me the results of the steps described above?
|
 rhettY
|
Hi,
I implemented it, and it seems the issue has been solved. Please check: antzracing.com
|
 Carlos Rojas
WPML Supporter since 03/2017
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/Madrid (GMT+02:00)
|
Yes, it is working on antzracing.com 🙂
Is there anything else we can help you with?
|
 rhettY
|
Will this be included in next release OR a fix specific for my case?
|
 Carlos Rojas
WPML Supporter since 03/2017
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/Madrid (GMT+02:00)
|
I'm checking with our compatibility specialists to determine the status of this issue.
|
 rhettY
|
Thanks.
If this is included in next release, I will delete the custom code in functions.php
|
 Carlos Rojas
WPML Supporter since 03/2017
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/Madrid (GMT+02:00)
|
I'm still waiting for an answer from our compatibility specialists. I will let you know their opinion.
|
 rhettY
|
Hi,
I saw there is one more cookie: wcml_client_currency_language. Will this one affect the cache vary? I am setting up crawler. I've set up cookie simulations:
wp-wpml_current_language, value: en, de, _null
wcml_client_currency, value: USD, CAD, EUR, GBP, _null
Do I need to add "wcml_client_currency_language" in cache vary and crawler cookie simulation?
|
 Carlos Rojas
WPML Supporter since 03/2017
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/Madrid (GMT+02:00)
|
Hi,
1.- Our compatibility specialists suspect this issue is happening on your site and it is not a problem between WPML and LS Cache; however, they have raised this issue to take a deeper look in case there is a long-term solution that can be applied if another situation like this appears.
2.- Regarding the cookie wcml_client_currency_language, did you have any issues or problems with this cookie on your site? Is there any functionality affected related to the currency and this cookie?
|
 rhettY
|
I've changed to use "CURCY - WooCommerce Multi Currency Premium" for multicurrency. It can solve the cache miss issue. According to litespeed, with your plugin, it's not possible to solve the cache hit issue for first page load. It's always miss cache.
You may check curcy's solution and use its solution.
|