Issue with Object Cache enabled but not connected




Wordpress LScache Plugin: Issue with Object Cache enabled but not connected

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hi, I just pinpointed an issue that I thought might be good mentioning. I had Object Cache enabled on the plugin settings, but the connection itself wasnt working. This apparently broke wp-cron. It uses wp_using_ext_object_cache to check if Object Cache is in use. It returned true but, as no real connection existed, the following wp_cache_get() function returned nothing, breaking the code and making it execute only one hook at a time. It might be useful to set things up in a way that wouldnt allow enabling Object Cache without a working connection. Hi, you mean even you set OC to on , but no backend daemon as connection failed , wp-cron is broken ? Best regards, Yes. Because of this function in wp-config: function _get_cron_lock() global $wpdb $value = 0 if ( wp_using_ext_object_cache() ) / Skip local cache and force re-fetch of doing_cron transient in case another process updated the cache. / $value = wp_cache_get( doing_cron, transient, true ) else $row = $wpdb->get_row( $wpdb->prepare( SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1 , _transient_doing_cron ) ) if ( is_object( $row ) ) $value = $row->option_value return $value Expand When OC is turned on wp_using_ext_object_cache returns true. But if there is no real OC connection wp_cache_get( doing_cron, transient, true ) returning False and breaks later parts of the wp-config file code. Hi @asafm7, Once OC is ON, the object-cache.php file will be placed under content dir. If the OC has any connection problem later, not at the moment you enable it, the issue you mentioned will still happen. At that moment, the plugin or that object-cache.php file cant delete itself IMO.



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference