• Resolved mats1

    (@mats1)


    Hi!

    Thanks for a great plugin. When all pages are cached we have a really fast web shop. But we are experience that the woocommerce category pages losses it cache too often which makes the shop pages slow.
    We have Following set on the Woocommerce tab:
    Product update interval: “Purge product only when the stock status changes. Do not purge categories on changes to the quantity or stock status.”
    Use Front Page TTL for the Shop Page: “On”.

    Since the shop pages was losing its cache we use the Crawl function and to keep the pages cached as often they can.
    To try to understand why the pages cache is purged I enabled the Log function. Unfortunately the log file don’t give me any clues. Maybe because I don’t know what to look for.
    We use a service that synch our shop with our ERP system. The service use REST to update products regarding stock, price etc. My suspicions is that this updates purge the category pages but I can’t tell by looking in the log file.

    I really would like to have some help here to make our site fast always, not occasionally.
    Many thanks

    • This topic was modified 3 years, 9 months ago by mats1.
    • This topic was modified 3 years, 9 months ago by mats1.
    • This topic was modified 3 years, 9 months ago by mats1.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    please check this page , see what is the cache tag and purge tag

    Best regards,

    Thread Starter mats1

    (@mats1)

    Hi, thanks a lot.

    I have a question. Is every purge written in the log file? Or can a purge by auto purge rules take place without the purge is writing in the log?

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    if the purge that is initiated by the plugin , will be logged

    you can also enable debug log to ON (not to admin IP only) , it should accumulate into /wp-content/debug.purge.log

    Best regards,

    Thread Starter mats1

    (@mats1)

    Ok! The debug.purge.log was really good. I have four situation when the cache is purged. Can you please comment the four situations. I have removed the timestamps so it wont be too long.

    1. REST call

    ?? ——PUT HTTP/1.1 (HTTPS) /wc-api/v3/products/31129
    Query String: consumer_key=ck_2097f5c741bd635fcbf885c8a9775720d162a264&consumer_secret=cs_c5da2dc0a857f66a956040f5f7c32f581268d1b5
    User Agent: Apache-HttpClient/4.4.1 (Java/1.8.0_191)
    Accept:
    Accept Encoding:
    X-LSCACHE: true
    X-LiteSpeed-Purge: public,stale,7df_Po.31129,7df_URL.dad80b7598b21f93c59f9280d917487f,7df_W.recent-posts-1,7df_T.244,7df_T.9,7df_T.211,7df_T.208,7df_T.7315,7df_FD,7df_A.149,7df_F,7df_H,7df_PGS,7df_PGSRP,7df_D.202005,7df_REST,7df_Po.31124,7df_T.4,7df_T.129,7df_T.130,7df_T.131,7df_T.132,7df_T.133,7df_T.134,7df_T.135,7df_T.136,7df_PT.product,7df_product => LiteSpeed\LSC->send_headers()@535 => WP_Hook->apply_filters(,ARRAY)@292 => WP_Hook->do_action(ARRAY)@316 =>
    /home/idigdeni/b2c.idigdenim/wp-includes/load.php@484`

    <strong>2. Display product??</strong>
    ?? ——POST HTTP/1.1 (HTTPS) /product/ricky-oversized-dress-organic-2/
    Query String:
    HTTP_REFERER: https://idigdenim.com/product/ricky-oversized-dress-organic-2/?attribute_pa_color=pink-sand&attribute_pa_women-sizes=xxs
    User Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [FBAN/FBIOS;FBDV/iPhone10,5;FBMD/iPhone;FBSN/iOS;FBSV/14.4.2;FBSS/3;FBID/phone;FBLC/sv_SE;FBOP/5]
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept Encoding: gzip, deflate, br
    X-LSCACHE: true
    X-LiteSpeed-Purge: private,* => LiteSpeed\LSC->send_headers()@535 => WP_Hook->apply_filters(,ARRAY)@292 => WP_Hook->do_action(ARRAY)@316 =>
    /home/idigdeni/b2c.idigdenim/wp-includes/load.php@484`

    3. Checkout
    ?? ——POST HTTP/1.1 (HTTPS) /
    Query String: wc-ajax=checkout
    HTTP_REFERER: https://idigdenim.com/checkout/
    User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36
    Accept: application/json, text/javascript, */*; q=0.01
    Accept Encoding: gzip, deflate, br
    X-LSCACHE: true
    LSCACHE_VARY_COOKIE: aelia_cs_selected_currency
    X-LiteSpeed-Purge: private,* => LiteSpeed\LSC->send_headers()@535 => WP_Hook->apply_filters(,ARRAY)@292 => WP_Hook->do_action(ARRAY)@316 =>
    /home/idigdeni/b2c.idigdenim/wp-includes/load.php@484`

    <strong>4. Checkout order received</strong>
    ?? ——GET HTTP/1.1 (HTTPS) /checkout/order-received/55797/
    Query String: key=wc_order_iDRbs0ZLTLbFG&kco_confirm=yes&kco_order_id=156b6ef4-84dc-35c3-8d4f-732f8943a529
    HTTP_REFERER: https://idigdenim.com/
    User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36 Edg/91.0.864.41
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
    Accept Encoding: gzip, deflate, br
    X-LSCACHE: true
    X-LiteSpeed-Purge: public,7df_FD => LiteSpeed\LSC->send_headers()@535 => WP_Hook->apply_filters(,ARRAY)@292 => WP_Hook->do_action(ARRAY)@316 =>
    /home/idigdeni/b2c.idigdenim/wp-includes/load.php@484`

    • This reply was modified 3 years, 9 months ago by mats1.
    • This reply was modified 3 years, 9 months ago by mats1.
    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    actually I will need the full log …

    you can post it on https://pastebin.ubuntu.com/ then share the link

    Best regards,

    Thread Starter mats1

    (@mats1)

    Ok, here it comes
    https://pastebin.ubuntu.com/p/9dStG8ty5w/
    Thanks!

    Thread Starter mats1

    (@mats1)

    Here is some more records, this time some REST calls in the log.
    Keys and secret removed.
    https://pastebin.ubuntu.com/p/2Sbywt8cGn/

    Plugin Support qtwrk

    (@qtwrk)

    log tag rDC triggered a purge all , what was that action ?

    from the URI , it looks like you were editing something ?

    also , does product ID “/wc-api/v3/products/31129” , link to a lot of different categories ?

    Thread Starter mats1

    (@mats1)

    Thanks for looking in to it.

    So the logtag rDC was a manual update of orderstatus in woocommerce admin for an order.

    About the product with post id 31129, that is a variation which is linked to three categories which is what most products are in the shop.

    In the log I can see that the Aelia currency switcher plugin is appearing several times with this text.
    (LSCACHE_VARY_COOKIE: aelia_cs_selected_currency) I don’t see why the cache need to be purged because of that plugin unless we do change something in admin like exchange rate.

    Also I see a lot of
    “X-LiteSpeed-Purge: private,* => LiteSpeed\LSC->send_headers()@535 => WP_Hook->apply_filters(,ARRAY)@292 => WP_Hook->do_action(ARRAY)@316 =>
    /home/idigdeni/b2c.idigdenim/wp-includes/load.php@484”
    What happens on those transcations? What does —private,*— means?

    Could you please explain this.
    Many thanks

    Plugin Support qtwrk

    (@qtwrk)

    okay, that rDC triggers purge should be normal

    31129 if there 3 categories has parent or grand-parent category , it could lead to be purged as well.

    no , that cookie is for vary , should not related with purge

    when that cookie exists , you will have different caches for cookie=eur , for cookie=usd …etc

    private,* means to purge the private cache to that specific users , it usually happens when you logged in

    but this should not related to public cache

    Thread Starter mats1

    (@mats1)

    Hi qtwrk,

    So if I undersand you correct. So the rest update on 31129 could lead to purge of category pages despite that I have no auto purge rules set? If that is so can I prevent those purge?

    If I have different public caches for different aelia currency cookies, do I need to crawl for each and every cookie setting like eur usd etc?

    About the private cache, I see that we have “Cache logged in users” set to on. We want logged in users to use the public cache. Should I set the option to “Off”? And if I do so do I still need to crawl with role simulation? Read another question in the forum that said so.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    1) please provide the report number , you can get it in toolbox -> report -> click “send to LiteSpeed”

    2) yes , if you have multiple currencies set by cookie , you may need to crawler to crawl with cookies

    3) for login user to use pub cache, you will need to enable ESI , once ESI is on , it will “override” this “cache login user”

    login users have their own pub cache and share amont login users , and guest user has its own pub cache

    Best regards,

    Thread Starter mats1

    (@mats1)

    HI,

    here are the report no. ROAAOTFN

    Not sure I understand you. If we want guests and logged in customers to use the same public cache, what settings should we have on “Cached for logged in users” and ESI

    The main goal for us analysing the purges is to keep the shop cached as much as possible. We rarely change the terms in admin, we don’t show stock value/items left in the shop, we only show stock status “In stock or “Out of stock”

    Best regards

    Plugin Support qtwrk

    (@qtwrk)

    edit post (or product) will purge the category , this function is hard-coded , independent on auto-purge settings

    when you have enabled cached for login and ESI , here is the case :

    guest users : guest users will share same public cache , let’s name it as guest public

    login user : login users will share the same public cache AMONG themselves , let’s name it as login public

    these two are both “public” in their own way , but they don’t share across each other group

    Thread Starter mats1

    (@mats1)

    OK!

    you say that editing a product will purge the category. Will a REST update on a product also purge the category?

    Do you know a way to trigger a crawl after a REST update?

    Can you also explain the case when “Cache logged in users” and No ESI?
    How will the cache look for guest public and login public?

    Thanks

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Woocomerce shop pages are purged too often’ is closed to new replies.