Using WP Rocket to cache Woocommerce

Guy

I had  lot of issues with caching the wordpress site as it would create ghost movement in stock.

If I disallow REST API cache the sync should work correctly?

 

rocket_cache_reject_wp_rest_api

apply_filters( 'rocket_cache_reject_wp_rest_api', true );

Description

Allow or disallow caching of WordPress REST API. Default to disallow

Parameters

Boolean: a false value will force to cache the WordPress REST API

 

Guy

Comments

3 comments

  • Comment author
    Chris Muench

    That should help; but make sure there aren't any other cache plugins too.

    0
  • Comment author
    Guy

    Thanks.

    I need to specify the URLs that call for the API

    "When you do enable it, on the plugin's main page there will be a section called "Dynamic Cache" and you can specify URLs related to the API calls, which the plugin will not cache. "

    Guy

    0
  • Comment author
    Chris Muench

    anything in the url that contains wp-json

    0

Please sign in to leave a comment.