Hi @darktwen,
I think Redis Object Caching is a different plugin than WP Redis.
In either case, I wouldn’t recommend conditionally disabling your persistent object cache. The data in the object cache could get out of sync with the data in the database.
Thread Starter
Luka
(@darktwen)
We are using your plugin, the one with a slug wp-redis
https://wordpress.org/plugins/wp-redis/
Please let us know how to do this, we are not concerned about out of sync because this endpoint is used just for specific functionality that isn’t used anywhere on the site.
Hi @darktwen,
Something like this as your wp-content/object-cache.php
file might work (untested):
<?php
if ( false === stripos( $_SERVER['REQUEST_URI'], '/wp-json/rnlab-app-control/' ) ) {
require_once __DIR__ . '/plugins/wp-redis/object-cache.php';
}
It will conditionally load the actual object-cache.php
based on the request URI.
I’m not sure how reliably this will work though, if at all.