Provide a new user.shortcut_set cache context

Created on 2 April 2024, 4 months ago
Updated 6 April 2024, 4 months ago

Problem/Motivation

While working on πŸ› Shortcuts toolbar links are not updated automatically when default shortcut set is changed Needs review , we found out that shortcut set related caches for toolbar were not working as smooth as they could.

Biggest concerns were:

  • Shortcut set is using user context, that generates a cache entry per user, even if multiple users share the same shortcut set.
  • When a specific user's shortcut set is modified or unassigned, it was necessary to invalidate the shortcut set cache, forcing to recreate all cache entries mentioned above.

Steps to reproduce

  1. Install a clean drupal standard profile
  2. Add multiple users with access shortcuts and access toolbar permissions
  3. Login with all the user created above
  4. Confirm that cache_render table creates an entry whose cid start with shortcut_set_toolbar_links per user
  5. Create a second shortcut set and assign it to one of the users
  6. Confirm that a new cache has been created for the user with the new links
  7. Confirm that cache entries have been invalidated unnecessarily for users whose shortcut set has not been modified

Proposed resolution

Provide a new user.shortcut_set cache context that would solve the problematic scenario defined above.
Only one cache entry would be created and shared by all the users who have the same shortcut set
When a specific user changes their shortcut set, either a new cache entry would be created, or would reuse an existing one

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component
ShortcutΒ  β†’

Last updated 10 days ago

  • Maintained by
  • πŸ‡΅πŸ‡°Pakistan @jibran
Created by

πŸ‡ͺπŸ‡ΈSpain plopesc Valladolid

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024