Title: PHP Notice: Function wp_cache_flush_runtime was called incorrectly.
Last modified: December 1, 2022

---

# PHP Notice: Function wp_cache_flush_runtime was called incorrectly.

 *  [CoPilot](https://wordpress.org/support/users/wordpressorgtimpeter/)
 * (@wordpressorgtimpeter)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/php-notice-function-wp_cache_flush_runtime-was-called-incorrectly/)
 * Hi,
 * Thanks for the plugin! We just switched from the Memcached Redux plugin to yours,
   since yours seems to be better maintained.
 * There seems to be an issue though. Our debug.log gets flooded with the following
   message:
 * `[01-Dec-2022 20:48:03 UTC] PHP Notice: Function wp_cache_flush_runtime was called
   <strong>incorrectly</strong>. Your object cache implementation does not support
   flushing the in-memory runtime cache. Please see <a href="https://wordpress.org/
   support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more 
   information. (This message was added in version 6.1.0.) in /wp-includes/functions.
   php on line 5835`
 * Note. This message is new with 6.1 and the previous plugin had the same issue.
 * Any ideas?
 * Cheers,
    Tim

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

 *  [Ben Andersen](https://wordpress.org/support/users/ben72/)
 * (@ben72)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/php-notice-function-wp_cache_flush_runtime-was-called-incorrectly/#post-16253434)
 * [@wordpressorgtimpeter](https://wordpress.org/support/users/wordpressorgtimpeter/)
   I’m on LiteSpeed cache with REDIS and seeing the same thing. So it’s a more general
   issue it seems.
 *  Plugin Contributor [Andrija Vučinić](https://wordpress.org/support/users/aidvu/)
 * (@aidvu)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/php-notice-function-wp_cache_flush_runtime-was-called-incorrectly/#post-16266089)
 * Yeah, seems related to this [https://core.trac.wordpress.org/changeset/54448](https://core.trac.wordpress.org/changeset/54448).
   Will take a look in the coming weeks.
 * For now, you can probably just add:
 *     ```
       function wp_cache_supports( $feature ) {
           if ( $feature === 'flush_runtime' ) {
               return true;
           }
           return false;
       }
       ```
   
 *  [SimpleRick](https://wordpress.org/support/users/keramikoch/)
 * (@keramikoch)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/php-notice-function-wp_cache_flush_runtime-was-called-incorrectly/#post-16269067)
 * We do have the same error
 *  Thread Starter [CoPilot](https://wordpress.org/support/users/wordpressorgtimpeter/)
 * (@wordpressorgtimpeter)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-notice-function-wp_cache_flush_runtime-was-called-incorrectly/#post-16289664)
 * Thank you for acknowledging [@aidvu](https://wordpress.org/support/users/aidvu/)
   Let’s hope you find a permanent solution soon.
 *  [Ben Andersen](https://wordpress.org/support/users/ben72/)
 * (@ben72)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-notice-function-wp_cache_flush_runtime-was-called-incorrectly/#post-16290160)
 * After updating to the latest LiteSpeed cache plugin I’m not seeing this in the
   logs any longer.
 *  [kindking](https://wordpress.org/support/users/kindking/)
 * (@kindking)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/php-notice-function-wp_cache_flush_runtime-was-called-incorrectly/#post-16504157)
 * I’m having same issue. Can somebody find out any solution. i don’t have installed
   any cache plugin. Just have woocommerce.
 *     ```wp-block-code
       ErrorException
       User Notice: Function wp_cache_flush_runtime was called <strong>incorrectly</strong>. Your object cache implementation does not support flushing the in-memory runtime cache. Please see <a href="https://wordpress.org/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.1.0.)
       ```
   
 *  Plugin Contributor [Andrija Vučinić](https://wordpress.org/support/users/aidvu/)
 * (@aidvu)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/php-notice-function-wp_cache_flush_runtime-was-called-incorrectly/#post-16517995)
 * [@kindking](https://wordpress.org/support/users/kindking/) try [https://wordpress.org/support/topic/php-notice-function-wp_cache_flush_runtime-was-called-incorrectly/#post-16266089](https://wordpress.org/support/topic/php-notice-function-wp_cache_flush_runtime-was-called-incorrectly/#post-16266089).
   Didn’t have time yet to fix.
 *  [Gik000](https://wordpress.org/support/users/gik000/)
 * (@gik000)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-notice-function-wp_cache_flush_runtime-was-called-incorrectly/#post-16549507)
 * Where should this function be added?
 *  Plugin Contributor [Andrija Vučinić](https://wordpress.org/support/users/aidvu/)
 * (@aidvu)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-notice-function-wp_cache_flush_runtime-was-called-incorrectly/#post-16555454)
 * > Where should this function be added?
 * Hey, in `object-cache.php`.
 *  [bremnerr](https://wordpress.org/support/users/bremnerr/)
 * (@bremnerr)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-notice-function-wp_cache_flush_runtime-was-called-incorrectly/#post-16840696)
 * Tried the above fix which resulted in the error: Cannot redeclare wp_cache_supports()(
   previously declared in /var/web/site/public_html/wp-includes/cache-compat.php:
   198)
 *  [ITP TECHNOLOGIE](https://wordpress.org/support/users/abitp/)
 * (@abitp)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-notice-function-wp_cache_flush_runtime-was-called-incorrectly/#post-16892910)
 * same error

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

The topic ‘PHP Notice: Function wp_cache_flush_runtime was called incorrectly.’ 
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/memcached.svg)
 * [Memcached Object Cache](https://wordpress.org/plugins/memcached/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/memcached/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/memcached/)
 * [Active Topics](https://wordpress.org/support/plugin/memcached/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/memcached/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/memcached/reviews/)

 * 11 replies
 * 8 participants
 * Last reply from: [ITP TECHNOLOGIE](https://wordpress.org/support/users/abitp/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/php-notice-function-wp_cache_flush_runtime-was-called-incorrectly/#post-16892910)
 * Status: not resolved