Sometimes you might want to cache a fragment that is dependent on a CMS entity and have that fragment automatically change when the entity is updated.
This is possible by using calling the
cacheKey method of the entity and use using the resulting string as a cache key. This way, a different cache key will be requested in case the entity is changed.
You can also nest such fragments and use the
cacheKey method on all dependent entities to build a compound key.