Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add abderrahimghazali/drupal-boost --skill caching-strategygit clone --depth 1 https://github.com/abderrahimghazali/drupal-boostWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/abderrahimghazali/drupal-boost/caching-strategy)<a href="https://agentmods.dev/skills/abderrahimghazali/drupal-boost/caching-strategy"><img src="https://agentmods.dev/badge/skills/abderrahimghazali/drupal-boost/caching-strategy/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/abderrahimghazali/drupal-boost/caching-strategy"><img src="https://agentmods.dev/badge/skills/abderrahimghazali/drupal-boost/caching-strategy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00042 | $0.01003 |
| Opus 5.5 | $0.00017 | $0.00401 |
| Sonnet 5.5 | $0.00008 | $0.00201 |
| Haiku 4.5 | $0.00004 | $0.00100 |
Grade A, and why
caching-strategy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Drupal Caching Strategy
Cache Metadata (The Three Pillars)
Every render array MUST include cache metadata:
$build = [
'#theme' => 'my_template',
'#data' => $data,
'#cache' => [
'tags' => ['node_list', 'node:42'], // WHAT invalidates this
'contexts' => ['user.permissions', 'url.path'], // WHAT varies this
'max-age' => 3600, // HOW LONG to cache (seconds)
],
];
Cache Tags — "What invalidates this cache?"
node:NID— Invalidated when a specific node changesnode_list— Invalidated when any node is created/updated/deleteduser:UID— Invalidated when a specific user changestaxonomy_term:TID— Invalidated when a term changesconfig:system.site— Invalidated when site config changes- Custom:
MODULE_NAME:ENTITY:ID
Invalidate manually:
\Drupal\Core\Cache\Cache::invalidateTags(['node:42']);
Cache Contexts — "What makes this vary?"
user— Different per useruser.permissions— Different per permission set (fewer variations)user.roles— Different per role combinationurl.path— Different per URL pathurl.query_args— Different per query stringurl.query_args:sort— Different per specific query paramlanguages:language_interface— Different per languagetheme— Different per themeroute— Different per route
Max-Age
Cache::PERMANENT(or-1) — Never expires (invalidated by tags only)0— Uncacheable (use sparingly — kills performance)3600— Cache for 1 hour86400— Cache for 1 day
Cache Bubbling
Cache metadata "bubbles up" from child elements to parents. Drupal automatically merges:
- Tags: Union of all tags
- Contexts: Union of all contexts
- Max-age: Minimum of all max-ages (most restrictive wins)
This means if ANY child has max-age: 0, the entire page becomes uncacheable.
Lazy Builders
For uncacheable content within cacheable pages:
$build['dynamic_part'] = [
'#lazy_builder' => ['MODULE_NAME.my_service:renderDynamic', [$entity_id]],
'#create_placeholder' => TRUE,
];
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 140 lines · 42 tokens per session scan A 0d4ac4cbe83f
caching-strategy is a skill published in the GitHub repository abderrahimghazali/drupal-boost (1 stars, last pushed 8mo ago), licensed MIT. It adds 42 tokens to every session and 1,003 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
caching-strategy compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| caching-strategyabderrahimghazali/drupal-boost | Skill | 1 | 8mo ago | MIT | A | 42 | Claude Code |
| idempotency-handlingsecondsky/claude-skills | Skill | 257 | today | MIT | A | 46 | Claude Code |
| ts-db-perfwidnyana/eyay-toolkits | Skill | 9 | 13d ago | MIT | A | 107 | Claude Code |
| Cache Strategy Consistency Guards977043/river-review | Skill | 8 | yesterday | MIT | A | 29 | Claude Code |
| nestjs-caching-queuesdkmqflx/nestjs-best-practices-plugin | Skill | 1 | 5mo ago | MIT | A | 63 | Claude Code |
| phoenix-contextsoliver-kriska/claude-elixir-phoenix | Skill | 579 | today | MIT | A | 46 | Claude Code |
| background-job-orchestratorcuriositech/some_claude_skills | Skill | 282 | 3d ago | MIT | A | 95 | Claude Code |