we are trying to invalidate a multi site CloudFront cache using the Wagtail CF Cache framework we have a settings as
WAGTAILFRONTENDCACHE ={
'mainsite': {
'BACKEND': 'core.cache.CloudfrontBackend',
'DISTRIBUTION_ID': 'dist_id_1',
'HOSTNAMES': ['mainsite'],
},
'multisite': {
'BACKEND': 'core.cache.CloudfrontBackend',
'DISTRIBUTION_ID': 'dist_id_2',
'HOSTNAMES': ['multisite'],
},
}
However the Multisite CF cache is not invalidated when I publish/unpublish a Page from the main site Is this config correct There are not errors reported I can see in our DEV env
I thought dist_ids as a dict had bee removed but this is still in code base
if isinstance(self.cloudfront_distribution_id, dict):
if "HOSTNAMES" in params:
self.hostnames.extend(self.cloudfront_distribution_id.keys())
else:
self.hostnames = list(self.cloudfront_distribution_id.keys())