Assistance Needed: Cache Invalidation for Multiple Domains in AEM as a Cloud Service
Hello Community,
We are utilizing AEM as a Cloud Service and managing multiple domains for each program.
For example, we have several domains such as "www.mysite1.com" with the content path /content/mysite1 and "www.mysite2.com" with the content path /content/mysite2.
We have configured vhost and farm files for each domain, creating the following document roots:
www.mysite1.com → /var/www/html/www.mysite1.com
www.mysite2.com → /var/www/html/www.mysite2.com
We did not include a serveralias in the above farm files
Cache is stored as follows:
For "www.mysite1.com": /var/www/html/www.mysite1.com/content/mysite1/..
For "www.mysite2.com": /var/www/html/www.mysite2.com/content/mysite2..
To handle cache invalidation for multiple domains, we created a new farm file for this purpose according to Adobe's documentation:
"
/farm_invalidate {
/virtualhosts { "*localhost*" }
/renders {
/rend01 { /hostname "127.0.0.1" /port "4503" }
}
/cache {
/docroot "/var/www/html" # Higher-level docroot encompassing both site1 and site2
/statfileslevel "1"
/invalidate {
/0000 { /glob "*" /type "allow" }
}
}
}
"
When we publish any page, the above farm files for invalidation are being recognized, but the cache clearing is not functioning as expected.
From my understanding, to resolve this, should I set the docroot to /var/www/html for all farm files and adjust the cache paths to /var/www/html/content/mysite1 and /var/www/html/content/mysite2? Or is there a better approach to maintain document roots with domains while ensuring proper cache invalidation in AEM Cloud?
your help is highly appreciated.