• Hi Breeze team,

    First of all, thanks for the great plugin! I’ve recently switched from WP Super Cache to Breeze and I’m very happy with it so far.

    I noticed a small issue when using two domains for the same WordPress installation (example.at as the primary domain and example.de as an additional domain).

    Breeze correctly creates and serves separate caches for both domains. However, when updating a page or product, only the cache for the primary domain is invalidated. The cached version on the second domain remains unchanged.

    Looking at the code, it seems that collect_urls_for_cache_purge() collects URLs based on the primary WordPress domain.

    I found a simple workaround using the existing breeze_collect_urls_for_cache_purge filter to add the corresponding URLs for the second domain.

    I understand that supporting multiple domains on a single WordPress installation may be an uncommon setup, but maybe my feedback helps.

    Thanks again for your work!

    My current workaround:

    add_filter( 'breeze_collect_urls_for_cache_purge', function ( $urls ) {
    $domains = [
    'www.example.at',
    'www.example.de',
    ];

    foreach ( $urls as $url ) {
    $host = wp_parse_url( $url, PHP_URL_HOST );

    if ( in_array( $host, $domains, true ) ) {
    foreach ( $domains as $domain ) {
    $urls[] = str_replace( $host, $domain, $url );
    }
    }
    }

    return array_unique( $urls );
    } );
Viewing 1 replies (of 1 total)
  • Plugin Author owaisalam

    (@owaisalam)

    Thank you for the kind words, and for the detailed report and the workaround.

    We’ll investigate this behavior on our side to understand how cache purging works when multiple domains point to the same WordPress installation. Thanks for sharing your snippet. It’s useful context for reproducing the setup. Custom code isn’t something we can officially support, so please test it on your site before relying on it.

    If we need more details to reproduce the setup, we’ll follow up on this thread.

    Thanks again for helping improve Breeze.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.