neos-development-collection icon indicating copy to clipboard operation
neos-development-collection copied to clipboard

No way to flush caches when an image resource was replaced

Open dimaip opened this issue 9 years ago • 5 comments

Currently if you replace an image resource in Media browser, there is no way to configure automatic Fusion cache flushing for nodes that use that image.

I have no idea how to fix it, but it could be an issue for editors. The only manual workaround for them is to manually "touch" all relevant nodes that use that image.

Any ideas?

dimaip avatar Feb 26 '17 19:02 dimaip

I guess we could create a helper that extracts external references to objects from a node and creates tags for them. That way we could flush by those tags.

kitsunet avatar Feb 27 '17 08:02 kitsunet

Couldn't we use the asset usage strategies for that? In the moment the asset is replaced, all nodes that reference that asset need to be market as changed, which then triggers the cache flushing as configured.

daniellienert avatar Feb 27 '17 09:02 daniellienert

This should already be the case with https://github.com/neos/neos-development-collection/blob/192d9ead6addeba75c532d747298321210eb592d/Neos.Neos/Classes/Package.php#L79 + https://github.com/neos/neos-development-collection/blob/cbbffec2d5fc187f3b91da6997af8f48326c4480/Neos.Neos/Classes/Fusion/Cache/ContentCacheFlusher.php#L94

aertmann avatar Feb 27 '17 18:02 aertmann

@dimaip Indeed that works fine with images used as "real image properties". But links to assets (asset://…) do not work, is that what you experienced? If so, I have a fix prepared that I'll push today.

kdambekalns avatar May 16 '17 06:05 kdambekalns

Is that solved with #1575?

kdambekalns avatar Apr 18 '18 09:04 kdambekalns