Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    
    add_action( 'save_post', 'wp_cache_flush' );
    
    Thread Starter Sprintally ?

    (@sprintally)

    This should be added to the wp-config file. Right??

    Plugin Author Till Krüss

    (@tillkruess)

    No, actions need to be added to your theme’s functions.php file.

    Apologies for resurrecting (but I felt this was related). Can the flush be done for the specific page / post / url as such? So that the entire cache isnt being flushed.

    Plugin Author Till Krüss

    (@tillkruess)

    Yeah, you can add wp_cache_flush to any hooks to flush your cache. Not recommended tho. It would unnecessarily flush other data.

    Thread Starter Sprintally ?

    (@sprintally)

    What happened is when I publish a new post it doesn’t appear on the top of the home page until I flush the cache from the redis plugin setting and I’m doing it every time I publish a post.

    Plugin Author Till Krüss

    (@tillkruess)

    That’s a theme/plugin issue not clearing the cached key properly.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘how to auto clear cache after publish or update a post’ is closed to new replies.