cachebox-standalone

Configure standalone CacheBox caching factories and caches for CFML applications.

1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ColdBox/skills --skill cachebox-standalone
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cachebox-standalone
Source: https://github.com/ColdBox/skills/tree/main/cachebox
Command: npx skills add https://github.com/ColdBox/skills --skill cachebox-standalone

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provide a robust, production-ready caching layer for CFML applications running CacheBox outside of ColdBox, removing the complexity of installing, configuring, and managing cache lifecycle, eviction, and persistence across restarts.

Core Features & Use Cases

  • Flexible installation and bootstrap: install CacheBox, map libraries, and create a CacheFactory in Application.cfc or programmatically.
  • Named caches and providers: define multiple caches with different providers and object stores (ConcurrentStore, ConcurrentSoftReferenceStore, DiskStore, JDBCStore) per domain.
  • Eviction and resilience: configure eviction policies (LRU, LFU, FIFO, LIFO), TTL and last-access timeouts, and implement stampede-protection patterns and getOrSet usage.
  • Persistence and clustering options: use DiskStore or JDBCStore for restart-surviving caches and small clustered deployments.
  • Operational controls: schedule manual reaping in onRequestStart, expose getStats/getKeys for monitoring, register listeners for cache events, and call shutdown() on application end for safe shutdown.
  • Use Case: warm query caches on startup, store large serialized objects on disk, or provide memory-sensitive view caches with soft-reference stores.

Quick Start

Bootstrap a CacheFactory in your Application.cfc with scopeRegistration set to application and call application.cacheBox.reapAll() on each request to enable standalone CacheBox lifecycle management.

Frequently Asked Questions about cachebox-standalone

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure standalone caching in a CFML application without ColdBox?

To configure standalone caching in a CFML application, you install CacheBox, map the necessary libraries, and bootstrap a CacheFactory within Application.cfc or programmatically to manage cache lifecycle independently.

What eviction policies and object stores are available for CFML cache management?

CFML cache management supports LRU, LFU, FIFO, and LIFO eviction policies. Available object stores include ConcurrentStore, ConcurrentSoftReferenceStore, DiskStore, and JDBCStore for varying persistence and memory requirements.

How does stampede protection work when getting or setting cache values?

Stampede protection works by using the getOrSet pattern to prevent concurrent cache misses from overwhelming the origin. It ensures only one request populates the cache while others wait for the computed value.

Can I persist CFML caches across application restarts using DiskStore or JDBCStore?

Yes, you can persist CFML caches across application restarts by configuring DiskStore for file-based persistence or JDBCStore for database persistence, enabling restart-surviving caches and small clustered deployments.

How do I properly shut down CacheBox and monitor cache statistics?

To properly shut down CacheBox, call shutdown() on application end for graceful termination. Monitor cache statistics by exposing getStats and getKeys, and schedule manual reaping in onRequestStart for operational control.

When should I use soft-reference stores for memory-sensitive caching in CFML?

Soft-reference stores are ideal for memory-sensitive caching in CFML when storing volatile objects like view caches. ConcurrentSoftReferenceStore allows garbage collection to reclaim memory under pressure while maintaining cache functionality.