How to prevent a query coming from object cache?
-
Hi,
I’d like to prevent a REST API custom json endpoint showing cached results. The endpoint uses a simple
get_posts()
(with some parameters like ‘category_name’) set to recover and return a list of posts.Tried adding
define('WP_REDIS_DISABLED', true);
right before the get_posts() in the api_response method but it does not seem to have any effect.Is that because at that point it’s too late for WP_REDIS_DISABLED or is it because that constant only prevents new objects from being added to the cache but not ones already there from being used in responses?
Hope to be able to continue using this excellent plugin ??
- The topic ‘How to prevent a query coming from object cache?’ is closed to new replies.