• Resolved Skolzyashiy

    (@skolzyashiy)


    Hello. I`m using WP with external php script, that puts posts directly into DB, using giving ID (posts parsed from another site, and id of this post represent unique id of the post, so i can see if i already parsed that post). How can i manually delete cache file for the home, archives, categories after creating each new record in database?
    Ive try to use wp_update_post with giving id, but this function not updating, it creates new database record with new id.
    Currently i`ve simply delete all hypercache cache files after puting new post in database, but it weir path, and i want to delete cache of only changed pages = home, archive, categories.

    https://wordpress.org/plugins/hyper-cache-extended/

Viewing 1 replies (of 1 total)
  • Plugin Author mlazarov

    (@mlazarov)

    Hi, you can fire the HCE hook to cleanup the referenced post. Example:

    do_action(‘publish_post’,$post_id);

    or just call the HCE function (but first check if it available!):
    if(function_exists(‘hyper_cache_invalidate_post’)){
    hyper_cache_invalidate_post($post_id);
    }

Viewing 1 replies (of 1 total)
  • The topic ‘How can i manually invalidate cache?’ is closed to new replies.