• Resolved owengna

    (@owengna)


    Hi, I have generated multiple post types and custom fields and I noticed that the page loading speed is affected by the lot number of update_meta_cache query from the plugin. Is there any way to disable it? I am using litespeed cache so it is not necessary to cache it. Please let me know.

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

    (@alexandrubodea)

    Hi @owengna,

    Unfortunately, there’s not much we can do about this as it’s recommended to clear the cache once something gets updated. Otherwise, you could receive old data when querying meta information.

    Best regards,

    Thread Starter owengna

    (@owengna)

    But how about optimising the loading query?

    I checked the query monitor and noticed that all pages load all custom meta box data even though they are not needed for the current page.

    For example, I set up a custom meta box with data for a custom post type “Book”. I can see the custom meta box for “Book” is loaded with “update_meta_cache” on a normal page.

    Plugin Support alexandrubodea

    (@alexandrubodea)

    Hi @owengna,

    You can try using the following custom code to see if it helps:

    add_filter('init', 'wckc_remove_serialized_update');
    function wckc_remove_serialized_update(){
    	remove_filter( "get_post_metadata", 'wck_serialized_update_from_unserialized', 10, 4 );
    }

    You can use the code by adding it to your theme’s ‘functions.php’ file or by creating a new plugin as described here.

    Best regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘disable update_meta_cache’ is closed to new replies.