• I found a bug/optimization in this file:
    advanced-custom-fields/core/fields/_functions.php

    Added new line# 311
    $found = false;
    line# 314 changed to
    $field = wp_cache_get( ‘load_field/key=’ . $field_key, ‘acf’, false, $found );
    //To be consistent with how wp_cache_get() used elsewhere in ACF

    line# 316 added
    $old_field = is_object( $field ) ? clone $field : $field;
    // used for comparison optimization toward the end of this function

    line# 319 changed to
    if( !$found )
    // make use of the $found variable status

    line# 394 wrapped wp_cache_set within
    if ($field == $old_field) { wp_cache_set() }
    //prevents issuing an update to the cache if the value was not actually changed by any of the filters.

    These changes cut down on the number of cache updates sent significantly.

    https://www.ads-software.com/plugins/advanced-custom-fields/

  • The topic ‘Bugfix for ACF version 4.4.2’ is closed to new replies.