deco-edge-caching

Installation
SKILL.md

Deco Edge Caching

Complete caching infrastructure for Deco storefronts on Cloudflare Workers, provided by @decocms/tanstack (worker-entry) and @decocms/blocks/sdk (cache headers, profiles, loader cache).

Architecture Overview

Three caching layers work together:

Layer What Where TTL Control
Edge cache Full HTML responses Cloudflare Cache API + CDN cacheHeaders(profile) via worker-entry
Loader cache VTEX/Shopify API data In-memory per-isolate (V8) createCachedLoader() in setup.ts
Client cache Route data after navigation TanStack Router memory routeCacheDefaults(profile) on routes

The worker-entry is the authority for edge caching. Routes declare intent via headers() and staleTime, but the worker-entry overrides Cache-Control based on URL-detected profiles.

Cache Profiles

Installs
6
Repository
decocms/blocks
GitHub Stars
5
First Seen
Mar 11, 2026
deco-edge-caching — decocms/blocks