Hey guys, I am currently debugging an “issue” with the fusion cache.
Given I have a fusion prototype with a cache configuration like:
@cache {
mode = 'cached'
entryIdentifier {
staticIdentifier = 'aStaticPartHardToCalculate'
}
}
I want to have that fusion prototype be cached and reused whereever it is used.
I had the strange behavior that the element is re-generated over and over again. The reason is that the fusion path is used as part of the cache identifier in https://github.com/neos/neos-development-collection/blob/e24147fc4266a217e8c503bfa6dade078418b191/Neos.Fusion/Classes/Core/Cache/ContentCache.php#L185
return md5($fusionPath . '@' . $identifierSource);
That means, even if the prototype is cached with an static identifier, it is cached dependend on the fusion path which means it is at least cached separately for every document type.
Is there a reason to not cache the prototype independently?