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.myrest bin 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

Command icon 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

sergeydruua created an issue. See original summary.

  • sergeydruua committed b46e9f37 on 1.0.x
    Issue #3616447: Put the language in the cache keys and tag what the...
sergeydruua’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sergeydruua’s picture

Status: Fixed » Closed (fixed)