Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archive Views for Custom Post Types are not auto-purging #280

Closed
raamdev opened this issue Aug 18, 2014 · 4 comments
Closed

Archive Views for Custom Post Types are not auto-purging #280

raamdev opened this issue Aug 18, 2014 · 4 comments

Comments

@raamdev
Copy link
Contributor

raamdev commented Aug 18, 2014

When using a Custom Post Type, the cache for the archive view for that Custom Post Type does not get purged when an associated post is changed.

Steps to recreate this issue

  • Enable Quick Cache Pro
  • Create a Custom Post Type, for example:
add_action( 'init', 'create_post_type' );
function create_post_type() {
  register_post_type( 'acme_product',
    array(
      'labels' => array(
        'name' => __( 'Products' ),
        'singular_name' => __( 'Product' )
      ),
    'public' => true,
    'has_archive' => true,
    )
  );
}
  • Create a new post with that Custom Post Type, e.g., http://example.com/acme_product/product_1/
  • Visit the archive view for the Custom Post Type (e.g., http://example.com/acme_product/) to have Quick Cache generate a cache file for it
  • Change the title of the post you created (this should cause Quick Cache to purge the cache file for the associated archive view, e.g., /acme_product/
  • Reload the archive view for the Custom Post type (e.g., http://example.com/acme_product/). You'll notice that the old title (i.e., the old cache file) is still being loaded.

There is no Dashboard notice indicating that the archive view was purged when the post is edited.


Support threads referencing this issue

@raamdev
Copy link
Contributor Author

raamdev commented Sep 19, 2014

Closed by PR #324 and PR wpsharks/comet-cache-pro#79.

@raamdev raamdev closed this as completed Sep 19, 2014
@raamdev
Copy link
Contributor Author

raamdev commented Sep 19, 2014

Next release changelog:

  • Bug Fix: When Quick Cache purges/resets the cache for a post with a Custom Post Type, any cache files for the associated Custom Post Type archive view are now auto-purged. See #280.

@jaswrks
Copy link

jaswrks commented Sep 20, 2014

That's great! I completely missed custom post type archives for feeds also.
So great you got this in there.

@raamdev
Copy link
Contributor Author

raamdev commented Sep 20, 2014

That's great! I completely missed custom post type archives for feeds also.

Oh, I forgot to add that to the changelog. :) Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants