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

How to clear paginated homepage programmatically? #935

Open
Luc45 opened this issue Dec 9, 2019 · 0 comments
Open

How to clear paginated homepage programmatically? #935

Luc45 opened this issue Dec 9, 2019 · 0 comments

Comments

@Luc45
Copy link

Luc45 commented Dec 9, 2019

First, thanks for Comet Cache. It's the best Cache plugin and I've been using it for years.

I have the Pro version, I want to clear the Homepage cache programmatically, but the homepage is paginated. How can I achieve that?

Examples:

Page 1: example.com
Page 2: example.com/page/2
Page 287: example.com/page/287

\comet_cache::clear(); // Clears the entire cache, not what I want
\comet_cache::clearUrl( get_site_url() ); // I think this would clear only page 1
\comet_cache::clearPost( get_option( 'page_on_front' ) ); // This could work, but I use "Recent posts" instead of a page on wp-admin/options-reading.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant