How to clear the cache?

Have you looked at WP_Object_Cache?

If you suspect there is unwanted caching happening in the code that generates the admin panel then you might be able to use functions from the WP_Object_Cache to clear it.

WP_Object_Cache is WordPress’ class for caching data which may be
computationally expensive to regenerate, such as the result of complex database queries.

Try the function wp_cache_flush() which clears all cached data.

Leave a Comment