Skip to content

VIVOMEDIA/neos-asset-collection-cache-flusher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Neos CMS Asset and AssetCollection cache flusher

Latest Stable Version Total Downloads License

This package provides functionality to flush asset and asset collection caches on changes to themselves or there containing assets.

Install

Install with composer

composer require vivomedia/neos-asset-collection-cache-flusher 

Usage

Asset

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}
        }
    }
}

AssetCollection

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')}
        }
    }
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages