Viewing 2 replies - 1 through 2 (of 2 total)
  • Clear the cache when you’re finished editing the links. AFAIR, there are no actions to hook on to to clear the cache automatically.

    Thread Starter gioliciouswp

    (@gioliciouswp)

    i read https://codex.www.ads-software.com/Plugin_API/Action_Reference and there are Blogroll Actions like:

    add_link
    Runs when a new blogroll link is first added to the database. Action function arguments: link ID.
    delete_link
    Runs when a blogroll link is deleted. Action function arguments: link ID.
    edit_link
    Runs when a blogroll link is edited. Action function arguments: link ID.

    can you add those to wp-super-cache?

    i checked wp-cache-phase2.php which contains this function:

    `if(function_exists(‘add_action’) && ( !defined( ‘WPLOCKDOWN’ ) || ( defined( ‘WPLOCKDOWN’ ) && constant( ‘WPLOCKDOWN’ ) == ‘0’ ) ) ) {
    // Post ID is received
    add_action(‘publish_post’, ‘wp_cache_post_edit’, 0);
    add_action(‘edit_post’, ‘wp_cache_post_change’, 0); // leaving a comment called edit_post
    add_action(‘delete_post’, ‘wp_cache_post_edit’, 0);
    add_action(‘publish_phone’, ‘wp_cache_post_edit’, 0);
    // Coment ID is received
    add_action(‘trackback_post’, ‘wp_cache_get_postid_from_comment’, 99);
    add_action(‘pingback_post’, ‘wp_cache_get_postid_from_comment’, 99);
    add_action(‘comment_post’, ‘wp_cache_get_postid_from_comment’, 99);
    add_action(‘edit_comment’, ‘wp_cache_get_postid_from_comment’, 99);
    add_action(‘wp_set_comment_status’, ‘wp_cache_get_postid_from_comment’, 99);
    // No post_id is available
    add_action(‘delete_comment’, ‘wp_cache_no_postid’, 99);
    add_action(‘switch_theme’, ‘wp_cache_no_postid’, 99);
    add_action(‘edit_user_profile_update’, ‘wp_cache_no_postid’, 99);

    add_action(‘wp_cache_gc’,’wp_cache_gc_cron’);

    do_cacheaction( ‘add_cacheaction’ );
    }`

    i hope you can add ADD, EDIT or DELETE hook to this function. just need to show the link on the homepage without clearing the whole cache.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP Super Cache] not updating cache when adding blogroll links’ is closed to new replies.