This package provides functionality to flush asset and asset collection caches on changes to themselves or there containing assets.
Install with composer
composer require vivomedia/neos-asset-collection-cache-flusher
prototype(SomePackage:Asset) < prototype(Neos.Neos:ContentComponent) {
renderer = afx`
...
`
@cache {
mode = 'cached'
entryIdentifier {
asset = ${q(node).property('asset').identifier} // or some other identifier
}
entryTags {
asset = ${'Asset_' + q(node).property('asset').identifier}
}
}
}
prototype(SomePackage:AssetCollection) < prototype(Neos.Neos:ContentComponent) {
renderer = afx`
...
`
@cache {
mode = 'cached'
entryIdentifier {
collection = ${q(node).property('assetCollection')} // or some other identifier
}
entryTags {
collection = ${'AssetCollection_' + q(node).property('assetCollection')}
}
}
}