New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing nodes in a user workspace will flush the live cache #2096

johannessteu opened this Issue Jun 26, 2018 · 0 comments


None yet
1 participant

johannessteu commented Jun 26, 2018

When editing a node or even whilte typing and a autosave is triggered the live cache is flused. Is the the case since we regsiter a node to the contentnodeflusher wich will register the tag Node_Identifier to be flushed. Since all nodes in all workspace share the same identifier the live cache is always flushed. Even if the change is not published.

To fix this we need to somehow prefix the Node_, NodeType_ and DescandOf_ tags with the current workspace. The ContentCacheFlusher must also respect child workspaces when tags are registered wich should be flushed.

johannessteu added a commit to johannessteu/neos-development-collection that referenced this issue Jun 27, 2018

FEATURE: CacheEntires should respect the workspace they rely on
Before this change there are no cache entries based on a workspace. So editing a node in the neos backend would always flush the live cache even if you do not publish the change to live. This happens as the we do not respect the current workspace in our cache tags.

This change will adjust all generated content cache tags and respect the related workspace. The `ContentCacheFlusher` will also only flush cache entries for the current workspace. As a fallback we still write and flush the old tags.
To make use of the new cache tags inside fusion use the CachingHelper like this `${Neos.Caching.nodeTag(node)}`. This will create all correct cache tags wich are needed.

Resolves neos#2096

kitsunet added a commit that referenced this issue Jul 16, 2018

Merge pull request #2097 from johannessteu/cache-workspace-prefix
FEATURE: CacheEntries should respect the workspace they rely on

Resolves #2096

- [X] CacheHelper should prefix the Workspace correct
- [X] Use the CachingHelper instead of Hardcoded Tags 
- [x] ContentCacheFlusher should generate correct Tags to flush
- [x] Update Documentation
- [x] Check if some code migrations are possible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment