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 ThibautBaissac/rails_ai_agents --skill caching-strategiesgit clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agentsWrote 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/thibautbaissac/rails_ai_agents/caching-strategies)<a href="https://agentmods.dev/skills/thibautbaissac/rails_ai_agents/caching-strategies"><img src="https://agentmods.dev/badge/skills/thibautbaissac/rails_ai_agents/caching-strategies/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/thibautbaissac/rails_ai_agents/caching-strategies"><img src="https://agentmods.dev/badge/skills/thibautbaissac/rails_ai_agents/caching-strategies.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00077 | $0.01434 |
| Opus 5.5 | $0.00031 | $0.00574 |
| Sonnet 5.5 | $0.00015 | $0.00287 |
| Haiku 4.5 | $0.00008 | $0.00143 |
Grade A, and why
caching-strategies 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 2mo 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 — 191 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Caching Strategies for Rails 8
Overview
Rails provides multiple caching layers:
- Fragment caching: Cache view partials
- Russian doll caching: Nested cache fragments
- Low-level caching: Cache arbitrary data
- HTTP caching: Browser and CDN caching
- Query caching: Automatic within requests
Quick Start
# config/environments/development.rb
config.action_controller.perform_caching = true
config.cache_store = :memory_store
# config/environments/production.rb
config.cache_store = :solid_cache_store # Rails 8 default
# OR
config.cache_store = :redis_cache_store, { url: ENV["REDIS_URL"] }
Enable caching in development:
bin/rails dev:cache
Cache Store Options
| Store | Use Case | Pros | Cons |
|---|---|---|---|
:memory_store |
Development | Fast, no setup | Not shared, limited size |
:solid_cache_store |
Production (Rails 8) | Database-backed, no Redis | Slightly slower |
:redis_cache_store |
Production | Fast, shared | Requires Redis |
:file_store |
Simple production | Persistent, no Redis | Slow, not shared |
:null_store |
Testing | No caching | N/A |
Fragment Caching
Basic Fragment Cache
<%# app/views/events/_event.html.erb %>
<% cache event do %>
<article class="event-card">
<h3><%= event.name %></h3>
<p><%= event.description %></p>
<time><%= l(event.event_date, format: :long) %></time>
<%= render event.venue %>
</article>
<% end %>
Cache Key Components
Rails generates cache keys from:
- Model name
- Model ID
updated_attimestamp- Template digest (automatic)
# Generated key example:
# views/events/123-20240115120000000000/abc123digest
Custom Cache Keys
<%# With version %>
<% cache [event, "v2"] do %>
...
<% end %>
<%# With user-specific content %>
<% cache [event, current_user] do %>
...
<% end %>
<%# With explicit key %>
<% cache "featured-events-#{Date.current}" do %>
<%= render @featured_events %>
<% end %>
What ships with it
3 files 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.
- 2mo ago First seen · 191 lines · 77 tokens per session scan A b85f4b265474
caching-strategies is a skill published in the GitHub repository ThibautBaissac/rails_ai_agents (672 stars, last pushed 5mo ago), licensed MIT. It adds 77 tokens to every session and 1,434 once invoked, about $0.0003 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-30.
caching-strategies compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| caching-strategiesThibautBaissac/rails_ai_agents | Skill | 672 | 5mo ago | MIT | A | 77 | Claude Code |
| mem0-oss-to-platformmem0ai/mem0 | Skill | 68k | 2d ago | Apache-2.0 | A | 217 | Claude Code, Codex |
| azure-mgmt-botservice-dotnetmicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 78 | Claude Code |
| fastapi-router-pymicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 46 | Claude Code |
| dev-runtimelangwatch/langwatch | Skill | 5.0k | yesterday | Apache-2.0 | A | 172 | Claude Code |
| api-designericrisco/rsc-harness | Skill | 503 | 2d ago | MIT | A | 105 | Claude Code, Codex |
| migrate-segw-to-raparc-mcp/arc-1 | Skill | 252 | yesterday | MIT | A | 106 | Claude Code |