• Hi there – normally I have on my website caching enabled for guest users with WpRocket and make it compatible with Yith Wishlist by excluding these cookies from caching

    yith_wcwl_products
    yith_wcwl_session_COOKIEHASH
    yith_wcwl_session_

    As well as adding /wishlist(.*) to my exclusion list. This works fine.

    Now I want to test caching for logged in users with WpRocket but then encountered that the page was still showing a cached version even though I have something added to the wishlist as a registered user. I initially thought that WpRocket is at false, but then I realized that Yith Wishlist doesn’t place a cookie when it is a registered user.

    Is this indented behavior? If so, how can I make it work that the cookie gets also placed when the user is logged-in? Otherwise I don’t know how Yith Wishlist can be compatible with caching for logged in users.

    Thanks already!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi there,
    Thanks for contacting us!

    When the user is logged in, the addition to the wishlist is made via an AJAX call that adds the product to the wishlist based on your plugin settings.

    The cookie is only created and managed when there’s not session, to the value of the cookie “works” as a session would. Since the user is not logged in, there’s not session we can use and for that reason we use the cookies.

    Once the user is logged in, that means that there’s a session, so there’s no need to use any cookies in that case.
    You will need to tweak the AJAX setting of your WP Rocket plugin I think.

    Please, try it and let us know.
    Have a nice day!

    Thread Starter floow95

    (@floow95)

    Hi Hector,

    Thanks for coming back.

    Got you on this part. However, from here I am not sure what I should tweak in WpRocket. I have still reached out to their support one time. However, shouldn’t the Yith Wishlist Ajax functionality make it possible to load the heart icons in the product listing page via ajax? Even though I have enabled it, it doesn’t load the heart icons via ajax.

    Thanks again.

    Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,

    The AJAX functionality only works in relation to the loading of fragments of each item, such as the fragments of the hearts of the products, or the item counter, or the wishlist page, etc. The template that prints the heart is not loaded via AJAX. The cache solutions that we propose are only for non-registered users, since it is at the only time that cookies are used.

    If you have any other questions, feel free to contact us.

    Best regards.

    Thread Starter floow95

    (@floow95)

    Hi Juan,

    Wouldn’t it make sense to integrate this option in the long run? Basically, as it is right now, Yith Wishlist is not compatible with cache. When the main functionality “the wishlist icons” on product pages and product listing pages are getting also cached it is a bit strange.

    On the other hand I don’t know what this would do to the server-load when all heart icons are getting loaded via Ajax.

    However, due to this reason I am unable to integrate proper caching solutions for

    1. Registered Users
    2. Guest-Users who are using the wishlist by adding any item to the wishlist

    Unfortunately I have no specific numbers, but I would assume this would make about 20-30% of my users (considering 200.000 users per month) maybe even more.

    Also it prevents me from using other caching solutions (despite WpRocket) for example Nginx Redis Page Caching as wishlist-elements are getting cached.

    Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,

    Our plugin is not compatible with caching plugins, but we offer some solutions as you can see here.

    We will take into account what you say for future updates, thanks for your suggestion.

    If you have any other questions, feel free to contact us.

    Best regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Using Yith Wishlist with cache for registered users’ is closed to new replies.