Title: Redis Cache REST_API
Last modified: July 19, 2023

---

# Redis Cache REST_API

 *  Resolved [rpf5573](https://wordpress.org/support/users/rpf5573/)
 * (@rpf5573)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/redis-cache-rest_api/)
 * I think the redis plugin returns the data directly without calling the rest-api
   callback.
 * My code is this
 *     ```wp-block-code
       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 ?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/redis-cache-rest_api/#post-16907472)
 * No, you can’t turn it off and Redis Object Cache wouldn’t cache any requests/
   responses. Another plugin is causing this.
 *  Thread Starter [rpf5573](https://wordpress.org/support/users/rpf5573/)
 * (@rpf5573)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/redis-cache-rest_api/#post-16908364)
 * OK, thank you sir !

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Redis Cache REST_API’ is closed to new replies.

 * ![](https://ps.w.org/redis-cache/assets/icon-256x256.gif?rev=2568513)
 * [Redis Object Cache](https://wordpress.org/plugins/redis-cache/)
 * [Support Threads](https://wordpress.org/support/plugin/redis-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/redis-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redis-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redis-cache/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [rpf5573](https://wordpress.org/support/users/rpf5573/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/redis-cache-rest_api/#post-16908364)
 * Status: resolved