Problem/Motivation
The helper injects cache.default and keeps internal static caches. Cache keys must include the language code and the current user's permissions, otherwise multilingual sites and authenticated users can be served another context's data. There is also no documented invalidation strategy.
Proposed resolution
- Audit every cache key and include langcode plus any relevant context.
- Store cache items with entity cache tags so edits invalidate them automatically.
- Consider a dedicated
cache.myrestbin so the data can be cleared independently. - Add kernel tests proving that content edits invalidate cached structures.
Remaining tasks
Audit the caching code and add tags plus tests.
User interface changes
None.
API changes
None.
Issue fork myrest-3616447
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
sergeydruua commentedComment #6
sergeydruua commented