WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
category posts wont update unless cache is flushed (7 posts)

  1. bidhitter
    Member
    Posted 2 years ago #

    Starting on 9/3 our "blog" category page suddenly stopped showing new posts unless the cache is flushed. Found this out yesterday so it was 5 days without the plugin updating its cache on its own. No changes to anything have been made to plugin settings during this period of time. Also we're using AMZN as CDN

    has any one had this happen to them before?

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. Frederick Townes
    Member
    Plugin Author

    Posted 2 years ago #

    Can you submit a bug submission form from the support tab of the plugin?

  3. monfresh
    Member
    Posted 2 years ago #

    I am seeing this bug as well on this site: http://www.monfresh.com. When I add a new post in the "Fresh Tunes" category, it appears correctly on the home page and my RSS Feed gets updated as well (I am not caching the feed because it wasn't updating previously until I stopped caching it). However, when I go to the category page (http://www.monfresh.com/category/fresh-tunes/), the new posts don't appear until I empty the cache.

    I will submit the bug via the plugin's support tab.

  4. Frederick Townes
    Member
    Plugin Author

    Posted 2 years ago #

    Are your purge settings the defaults on the page cache settings tab?

  5. archonic
    Member
    Posted 1 year ago #

    I'm having the same problem. I feel like there should be a "categories feed" check box under "purge policy" in the page cache tab. The settings are default at the moment. And I'm not sure how to get the categories purge to automate. I'd like it to clear every time there is a post.

    Thanks in advance!

  6. archonic
    Member
    Posted 1 year ago #

    I've added this to my theme's functions.php.

    /**
     * Flushes out appropriate category pages when a post is updated.
     */
    function category_cache_flush_on_post( $post_id ) {
    	$post_categories = wp_get_post_categories( $post_id );
    
    	if(function_exists('w3tc_pgcache_flush_post')){
    		foreach($post_categories as $c)
    			w3tc_pgcache_flush_post($c[0]);
    	}
    
    }
    add_filter( 'save_post', 'category_cache_flush_on_post', 10, 1 );

    Unfortunately the category pages still aren't updating. I believe the problem is this line:
    w3tc_pgcache_flush_post($c[0]);
    I saw here you can just enter a category ID and it will flush the cache for that page?

    Thanks in advance again =)

  7. Frederick Townes
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks. This is better addressed in the next release.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic