Redis Cache REST_API | WordPress.org

[ad_1]

I think the redis plugin returns the data directly without calling the rest-api callback.

My code is this

register_rest_route($this->namespace, 'get-product-list', [
      'methods'             => 'GET',
      'callback'            => function(WP_REST_Request $request){
        global $wpdb;

        $user = wp_get_current_user();
        $user_id = $user->ID;
        ....
 ...

When turn on the redis object cache plugin, this code is not run. But just return result of processing !

Is it possible to turn of redis caching only at REST_API ?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer