- This topic is empty.
-
AuthorPosts
-
August 25, 2024 at 7:45 pm #26313
Olivia
GuestHello,
The website gets slow due to cache bypass rule that bypasses the cache whenever Qty in cart is greater than 0.
I used ChatGPT to find a solution:
https://chatgpt.com/share/b9514999-f093-48e9-9e87-828a1ba4f004Let me know your thoughts on this.
Regards
August 26, 2024 at 8:44 am #26314Louis
Guest???????????????????????????????????
404
August 27, 2024 at 8:04 am #26317Emma
Guestdamn is chatgpt now spamming web forums? get the AI back in the lab!
August 27, 2024 at 4:05 pm #26337Walter
GuestI am using this configuration and its working fine. let me know if it works for you as well.
## Set default cache status
set $skip_cache 0;## Query strings should always skip the cache
if ($query_string != “”) {
set $skip_cache 1;
}## Skip cache for cart and checkout pages
if ($request_uri ~* “/(cart|checkout|my-account|wc-api|wp-admin|login|register|order|view|dashboard|account|settings|contact)/”) {
set $skip_cache 1;
}## Do not cache RSS feeds or sitemaps
if ($request_uri ~* “/feed/|sitemap(_index)?.xml”) {
set $skip_cache 1;
}## Skip cache for logged-in users and recent commenters
if ($http_cookie ~* “wordpress_logged_in|wp-postpass|comment_author”) {
set $skip_cache 1;
}August 27, 2024 at 4:06 pm #26338Anna
GuestI am using this code and its working fine for me.
## Set default cache status
set $skip_cache 0;## Query strings should always skip the cache
if ($query_string != “”) {
set $skip_cache 1;
}## Skip cache for cart and checkout pages
if ($request_uri ~* “/(cart|checkout|my-account|wc-api|wp-admin|login|register|order|view|dashboard|account|settings|contact)/”) {
set $skip_cache 1;
}## Do not cache RSS feeds or sitemaps
if ($request_uri ~* “/feed/|sitemap(_index)?.xml”) {
set $skip_cache 1;
}## Skip cache for logged-in users and recent commenters
if ($http_cookie ~* “wordpress_logged_in|wp-postpass|comment_author”) {
set $skip_cache 1;
} -
AuthorPosts