netlogix/assetcachinghelper

Fusion Helper to create Asset Cache Tags

1.0.0 2021-08-19 12:59 UTC

This package is auto-updated.

Last update: 2024-07-13 23:32:41 UTC


README

This package provides a Fusion Helper that can be used to create an AssetTag. For every given asset, the following two types of tags will be generated:

  • Asset_<Asset Identifier> This tag is currently not flushed by Neos at all
  • AssetDynamicTag_<Asset Identifier> This tag is flushed whenever an Asset is changed

Usage

To create an asset tag, simply call the helper in your @cache block:

    @cache {
        mode = 'cached'

        entryIdentifier {
            node = ${node}
        }

        entryTags {
            node = ${Neos.Caching.nodeTag(node)}
            image = ${Netlogix.AssetCaching.assetTag(q(node).property('image'), node)}
        }
    }

The Helper takes either a single Asset or an array of Assets. Any null values will be ignored.