I have three separate domains. Each one is pointing to one single-context MODx installation. The difference between domains is conditional and based on If extra snippet that checks the site_url changes. Because of this, page load time is extremely slow. About 3 seconds. I discovered really nice Supercache extension, that increases page load in couple times. But problem is, when I visit first domain it caches and on second domain I am seeing content from the first one. Can I somehow clear the cache when site_url is changing?
I was trying to make $modx->cacheManager->refresh(); according to server HTTP_HOST, but no luck. It refreshes cache every single time domain is shown. E.g on every page visit on exact domain, so performance stays the same bad.