coldbox-cache-integrationlisted
Install: claude install-skill ColdBox/skills
# CacheBox — ColdBox Integration
## When to Use This Skill
Use this skill when adding caching to a **ColdBox application**. For standalone CacheBox usage (no ColdBox framework), see the `cachebox-standalone` skill.
## Language Mode Reference
Examples use **BoxLang (`.bx`)** syntax by default. For CFML replace `class` with `component` and use `property name="x" inject="y";` annotations.
| Concept | BoxLang | CFML |
|---------|---------|------|
| Class | `class {` | `component {` |
| WireBox inject annotation | `@inject( "dsl" )` above property | `property name="x" inject="dsl";` |
| View files | `.bxm` | `.cfm` |
---
## 1. How ColdBox Wires CacheBox
ColdBox creates and manages a CacheBox factory automatically. No `Application.cfc` bootstrap code is needed. The factory is accessible via:
```cfscript
// From any handler, interceptor, or service
var cacheBox = getCacheBox(); // the CacheBox factory
var defCache = getCache(); // default cache provider
var tplCache = getCache( "template" ); // named cache provider
```
---
## 2. Configuration
ColdBox looks for CacheBox config in this order:
1. `cachebox` DSL struct inside `config/ColdBox.cfc` → `configure()`
2. `config/CacheBox.cfc` (portable CFC by convention — recommended)
3. Built-in defaults at `coldbox/system/web/config/CacheBox.cfc`
### 2a. Default built-in caches (no config required)
ColdBox ships with two built-in caches:
| Cache name | Object store | Purpose |
|-----------|-----------