• Resolved danielecelsa

    (@danielecelsa)


    Hello,

    Thanks, as always, for your wonderful plugin ??

    Now, I realize that if the caching is enabled in my website, the reviews do not work well.
    I mean, if I submit a review, the page refresh (since I add ‘class=no-ajax’ as per your suggestion), but I can’t see the review because with caching enabled, I guess the browser shows me (after the refresh) the cached page, that is of course the one without new review. And do not show me the dynamic page with the new review.

    I know that caching should be enabled only in static pages, but do you maybe have some hint to allow reviews to show up dynamically when submitted, even if caching is enabled?
    Maybe it is a common issue, but I didn’t find it in FAQ.

    Thanks in advance as always!

    • This topic was modified 3 years, 2 months ago by danielecelsa.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    Are you using a caching plugin (if so, which one?), or are you doing server-side caching?

    Thread Starter danielecelsa

    (@danielecelsa)

    Hello,

    I am using WP Rocket plugin, I guess no caching implemented server-side.

    Thanks in advance,
    Daniele

    Plugin Author Gemini Labs

    (@geminilabs)

    You can try this (will be added to v5.16.0):

    add_action('site-reviews/review/created', function ($review, $command) {
        if (function_exists('rocket_clean_post')) {
            rocket_clean_post($command->post_id); // Purge the page the review was submitted on.
        }
    }, 10, 2);
    Thread Starter danielecelsa

    (@danielecelsa)

    Thank you very much, it works!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Reviews do not appear if the caching is enabled’ is closed to new replies.