• Resolved andrijam

    (@andrijam)


    Dear,

    I am interested in how I can turn off the purge cache after purchasing the product. We want to set the cache not to be renewed when the product is ordered.

    Is there any function that can be added to turn this off.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @andrijam

    Thank you for reaching out.
    Well, this is indeed a specific request. In most cases once the product is ordered the cache should be renewed. This being said, try disabling the options in Performance>Page Cache>Purge policy. If the cache is being purged after these settings are disabled, there is a chance that your theme or other plugin you are using may be calling w3tc_flush_all();

    You can check what may be calling the purge in the Performance>General settings>Debug section by enabling the Page Cache Purge log.

    I hope this helps!

    Thread Starter andrijam

    (@andrijam)

    Thanks for the reply, I found the causes. I’ll add this code and see if it fixes it:

    add_filter( ‘rank_math/sitemap/enable_caching’, ‘__return_false’);

    causes1:

    #4 wp-content/plugins/seo-by-rank-math/includes/class-helper.php(239)w3tc_pgcache_flush ()

    #5wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/class-cache.php(245)RankMath\Helper–clear_cache (“sitemap/1”)

    #6wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/class-cache-watcher.php(322)RankMath\Sitemap\Cache–invalidate_storage (“1”)

    causes2:

    I am not sure for this, no post was update and no comment was placed, but something flush cache:

    #3wp-includes/class-wp-hook.php(308)W3TC\Util_AttachToActions–on_post_change (15233, {“ID”:15233,”post_author”:”0″,”post_date”:”2022-12-29 16:01:49″,”post_date_gmt”:”2022-12-29 15:01:..)

    #4wp-includes/post.php(7404)do_action (“clean_post_cache”, 15233, {“ID”:15233,”post_author”:”0″,”post_date”:”2022-12-29 16:01:49″,”post_date_gmt”:”2022-12-29 15:01:..)

    #5wp-includes/comment.php(2755)clean_post_cache ({“ID”:15233,”post_author”:”0″,”post_date”:”2022-12-29 16:01:49″,”post_date_gmt”:”2022-12-29 15:01:..)

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @andrijam

    Thank you for your feedback. It’s a known fact that Rank math is calling the w3tc flush. We are working on the solution or a code snippet that will prevent this if the user need this for the usecase.

    Can you please confirm that the Purge policy options are disabled?
    Thanks!

    Thread Starter andrijam

    (@andrijam)

    After a few hours I can confirm that the problem is solved.

    add_filter( ‘rank_math/sitemap/enable_caching’, ‘__return_false’);

    Shop is now blazing fast, I also recommend bash cache regenerate on Ubuntu in Scheduled Cron Jobs.

    andrijamicic/bash-cache-warmer: This is a bash script that uses curl to warm up cache by targeting the sitemap.xml of the website (github.com)

    Thread Starter andrijam

    (@andrijam)

    Resolved

    • This reply was modified 1 year, 11 months ago by andrijam.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hey @andrijam

    Congrats on the bash-cache. the new commit for priming for mobile is an excellent addition. W3TC does have its own version of cache priming and we’ll keep improving it.
    We would really appreciate it if you could take a minute and post a review here. This will help us to continue offering a top-notch product to users.
    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Prevent Clear Cache on product pur’ is closed to new replies.