drupal-cache-contexts

Installation
SKILL.md

Drupal Cache Contexts

Cache contexts define request-dependent cache variations. Analogous to HTTP Vary header.

When to Use

  • Content varies by user role or permissions
  • Content changes based on URL parameters
  • Multi-language sites with localized content
  • Theme-dependent rendering
  • Preventing cache explosion from overly broad contexts

Available Contexts

Context Variations Use Case
user Per-user (AVOID) Truly personalized content only
user.roles Per-role combination Role-based visibility
user.permissions Per-permission set Permission-based content
Related skills

More from sparkfabrik/sf-awesome-copilot

Installs
21
GitHub Stars
1
First Seen
Jan 26, 2026