Skip to content

How to clear paginated homepage programmatically? #935

Description

@Luc45

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions