Support

Account

Forum Replies Created

  • After doing some digging in your ACF code, I may have a more targeted solution from the acf_get_value() function. This is untested, but assuming this is where the value is cached, it should easily be cleared on post update hook.

    	public function acf_clear_object_cache( $post_id ) {
    		if ( empty( $_POST['acf'] ) ) {
    			return;
    		}
    		
    		// clear post related cache
    		clean_post_cache( $post_id );
    		
    		// clear ACF cache
    		if ( is_array( $_POST['acf'] ) ) {
    			foreach ( $_POST['acf'] as $field_name => $value ) {
    				$cache_slug = "load_value/post_id={$post_id}/name={$field_name}";
    				wp_cache_delete( $cache_slug, 'acf' );
    			}
    		}
    	}
    
  • Likewise! Any news would be much appreciated.

    Thanks

Viewing 2 posts - 1 through 2 (of 2 total)