boxlang-caching

Configure named caches in boxlang.json with TTLs and eviction policies.

16|78|Updated Nov 28, 2014
One-click install
npx skills add https://github.com/ortus-docs/coldbox-docs --skill boxlang-caching
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: boxlang-caching
Source: https://github.com/ortus-docs/coldbox-docs/tree/main/.agents/skills/boxlang-caching
Command: npx skills add https://github.com/ortus-docs/coldbox-docs --skill boxlang-caching

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

BoxLang caching provides a structured, pluggable mechanism to store and retrieve frequently accessed data across in-memory, regional, and distributed caches, reducing load on data stores and improving response times.

Core Features & Use Cases

  • Centralized cache configuration via boxlang.json with multiple named caches and providers (default, sessions, queries, files).
  • Support for TTL, idle timeouts, eviction policies, and cache-region separation, plus cache-aside and write-through/read-through patterns.
  • Distributed caching using Redis or Couchbase, with optional locking to avoid cache stampedes, and support for output caching and query caching.

Quick Start

Use the boxlang-caching skill by configuring caches in boxlang.json and instrumenting your code with cachePut and cacheGet calls.

Frequently Asked Questions about boxlang-caching

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

FAQPage Schema
How do I configure distributed caching in BoxLang using Redis or Couchbase?

Distributed caching in BoxLang is configured via boxlang.json by defining named caches with BoxCacheProvider, enabling Redis or Couchbase integration with optional distributed locking to prevent cache stampedes.

How does BoxLang handle cache invalidation and eviction policies?

BoxLang caching manages cache invalidation and eviction through configurable TTLs, idle timeouts, and eviction policies applied across named cache regions to efficiently remove stale data.

Can I implement cache-aside and write-through patterns in BoxLang?

Yes, BoxLang caching supports cache-aside, write-through, and read-through patterns, allowing applications to interact with named caches using cachePut and cacheGet calls for structured data retrieval.

What is the best way to set up multiple named caches for queries and sessions in BoxLang?

The best way to set up multiple named caches in BoxLang is through centralized boxlang.json configuration, defining distinct providers for default data, sessions, queries, and files.

Does BoxLang support output caching and query caching to reduce data store load?

Yes, BoxLang caching includes built-in support for output caching and query caching, storing frequently accessed data in memory or distributed regions to significantly reduce data store load and improve response times.