epic-caching

Cache expensive computations and data fetches in Epic Stack apps.

Updated Jan 29, 2026
One-click install
npx skills add https://github.com/walbuc/iac-sorteios --skill epic-caching-walbuc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: epic-caching
Source: https://github.com/walbuc/iac-sorteios/tree/main/docs/skills/epic-caching
Command: npx skills add https://github.com/walbuc/iac-sorteios --skill epic-caching-walbuc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cache-based optimizations reduce latency and recomputation by persisting and reusing results across Epic Stack apps.

Core Features & Use Cases

  • Two cache backends: SQLite-based persistent cache (LiteFS replicated) and an in-memory LRU cache for fast, temporary data.
  • Integration with @epic-web/cachified for consistent management, including key naming, TTL, stale-while-revalidate, and Zod validation.
  • Patterns for cache invalidation, server timing integration, and examples for API responses and database queries.

Quick Start

Install cachified in your Epic Stack project, configure a basic cache, and validate cached data with Zod.

Frequently Asked Questions about epic-caching

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

FAQPage Schema
How do I cache expensive database queries in an Epic Stack app?▼

You can cache database queries in an Epic Stack app by applying cachified patterns with a SQLite-based persistent cache or in-memory LRU cache to reuse results and reduce latency.

What is the stale-while-revalidate caching pattern for API responses?▼

Stale-while-revalidate serves stale cached API responses immediately while fetching fresh data in the background, supported by Epic Stack caching patterns alongside TTL configurations.

Can I use SQLite and LRU caches together for server-side caching?▼

Yes, you can combine a SQLite-based persistent cache via LiteFS replication with an in-memory LRU cache for fast temporary data within your cachified setup.

Does cachified support Zod validation for cached data?▼

Yes, cachified supports Zod-based data validation to ensure cached values match expected schemas, preventing type errors when retrieving invalidated API responses or memoized results.

How do I handle cache invalidation across LiteFS replicated SQLite databases?▼

Cache invalidation across LiteFS replicated SQLite databases is managed through consistent key naming conventions and cachified integration patterns to purge stale memoized results correctly.

When should I not use an in-memory LRU cache for external data fetches?▼

Avoid using an in-memory LRU cache for external data fetches when you need data persistence across server restarts, opting instead for the SQLite-based cache backed by LiteFS.