• Resolved asafm7

    (@asafm7)


    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 wasn’t 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 wouldn’t allow enabling Object Cache without a working connection.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    you mean even you set OC to on , but no backend daemon as connection failed , wp-cron is broken ?

    Best regards,

    Thread Starter asafm7

    (@asafm7)

    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;
    }

    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.

    Plugin Support Hai Zheng?

    (@hailite)

    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 can’t delete itself IMO.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Issue with Object Cache enabled but not connected’ is closed to new replies.