TASK: Content cache adjustments
This adds an interface for other content caches than Neos' Fusion content cache.
Also flushes caches for deleted nodes, not just their parents, in case they or their types were used in CacheTags elsewhere
Checklist
- [x] Code follows the PSR-2 coding style
- [x] Tests have been created, run and adjusted as needed
- [x] The PR is created against the lowest maintained branch
- [ ] Reviewer - PR Title is brief but complete and starts with
FEATURE|TASK|BUGFIX - [ ] Reviewer - The first section explains the change briefly for change-logs
- [ ] Reviewer - Breaking Changes are marked with
!!!and have upgrade-instructions
Isn't the point of this to be not internal in order for people to use this? I guess fine for a start but this is supposed to become API right?
Good points, maybe we need an idea of projected use cases? I can see a point of getting informed when content caches are flushed and a case of being informed when the projections changed, but both could be done differntly, but overwriting the cache flushing in itself? Thinking about it I agree this might be the "wrong" extension point.
@bwaidelich yes, let's do this together... I have quite some ideas for improvements, including CacheTag VOs, Unit tests etc.
I think a interface like this to replace cache flushing is also bad practice, if we were to make this an extension point we would need some kind of chain where we can hook multiple flushers, as the ContentCacheFlusher is probably necessary.
I know that having an interface is more fancy but still, objects yaml exists and the ContentCacheFlusher is not final. So for your experimental usecase i would suggest to go down the road of extending the flusher and adding functionality and then for every place it is used use Objects.yaml to use your implementation as constructor argument.
That would make in my head much more sense at this stage. We as core devs have a little perk of being able to easily add what we want...
@nezaniel Is the interface still relevant?
flushes caches for deleted nodes, not just their parents
This is fixed by #5175
I think this can be closed, I've opted for AOP to solve this in the ComponentView for now.