• Resolved Mouk Lab

    (@digit89)


    Hi!
    I have a website page where you can load race results by clicking a button triggering a GET AJAX request. The response can be cached because most of the time the result does not change.

    I enabled almost everything but ESI, including object via Memcached and Cache WP-Admin.

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

    (@qtwrk)

    sadly no , ajax call was not meant to be cached by design , you can try use the Force Cache URI with the query string , but can’t if that will surely works

    Thread Starter Mouk Lab

    (@digit89)

    It worked forcing the URI, thank you!

    Now could you just help with how to make it dynamic, I don’t understand if we can use wildcards or not, like:
    /wp-admin/admin-ajax.php?action=my_action&unique_id=*&sessionType=*

    • This reply was modified 10 months, 3 weeks ago by Mouk Lab.
    Plugin Support qtwrk

    (@qtwrk)

    no , it won’t support wildcard , you need to use partial matching , extract the unique string from it

    Thread Starter Mouk Lab

    (@digit89)

    Yeah I figured out… Thank you. It’s working now.

    I just have a last question, private cache works well for me and loads of users, but for some users after they logged in they still see in the menu “Log in” instead of “Log out”, confirming they are indeed logged in.

    I don’t want to use ESI because it’s a real pain to implement, and moreover it works well for me and some users.

    Any idea?

    Plugin Support qtwrk

    (@qtwrk)

    please provide the report number

    you can get it in toolbox -> report – > click “send to LiteSpeed”

    Thread Starter Mouk Lab

    (@digit89)

    Report number: MOAHHFEO

    Report date:?01/10/2024 09:05:05

    Some people switching from their unsupported browser (firefox, opera) got the issue fixed but some other got the issue on Chrome.

    Plugin Support qtwrk

    (@qtwrk)

    from report , you force it to public cache , that means it will be same among login users

    Thread Starter Mouk Lab

    (@digit89)

    No the homepage URL is not in the Force Public Cache settings. Users log in on the home page and then get the home page with the Login button again instead of log out button.

    Sorry I forgot to mention that was about the homepage

    Plugin Support qtwrk

    (@qtwrk)

    hmmm? how do I register on your site ?

    Thread Starter Mouk Lab

    (@digit89)

    By clicking the register menu entry from the menu bar ??

    Plugin Support qtwrk

    (@qtwrk)

    oh right , I registered , but it seems display correct on me

    any more specific steps I need to do to trigger it ?

    meanwhile , can also try disable the object cache , see if it helps.

    Thread Starter Mouk Lab

    (@digit89)

    And if you click the menu entry My*** Profile, do you see your own profile or a random in cache?

    Plugin Support qtwrk

    (@qtwrk)

    it shows me like this

    ——

    I see , you should NOT force public cache on these pages ,at least private cache

    • This reply was modified 10 months, 2 weeks ago by qtwrk.
    Thread Starter Mouk Lab

    (@digit89)

    It’s not force cached. And the link is built on the homepage, it sends you directly to a user, it’s not like /my-profile, it’s /user-a
    So should I exclude the entire homepage?

    Plugin Support qtwrk

    (@qtwrk)

    I actually don’t understand why do you even put them into force cache setting besides these admin-ajax

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Caching AJAX requests’ is closed to new replies.