deco-cms-layout-caching

Cache resolved layout sections to avoid repeated CMS API calls.

5|2|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/decocms/deco-start --skill deco-cms-layout-caching
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deco-cms-layout-caching
Source: https://github.com/decocms/deco-start/tree/main/.cursor/skills/deco-cms-layout-caching
Command: npx skills add https://github.com/decocms/deco-start --skill deco-cms-layout-caching

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cache layout sections (Header, Footer, Theme, etc.) in @decocms/start to avoid redundant CMS resolutions and expensive API calls on every navigation.

Core Features & Use Cases

  • Multi-layer caching: page inflight dedup, resolved layout cache, and layout loader cache to minimize repeated resolutions and shelves API requests.
  • Targeted optimization: focus on layout-heavy sections that appear on every page (Header, Footer, Theme) to dramatically reduce latency.
  • Use Case: When PDP/NAV transitions would previously trigger identical Header shelves fetching new data, this cache returns the already-resolved layout.

Quick Start

Integrate the layout caching by registering the layout sections in setup.ts and monitor cache hits during navigation.

Frequently Asked Questions about deco-cms-layout-caching

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

FAQPage Schema
How do I reduce redundant CMS API calls during storefront navigation?

To cache layout sections in Deco Start, register the layout sections in setup.ts. This integrates a multi-layer caching strategy including page inflight dedup, resolved layout cache, and layout loader cache with TTLs to minimize repeated resolutions and shelves API requests.

Why does PDP navigation trigger identical Header shelves fetching new data?

PDP navigation triggers identical Header shelves fetching new data because layout sections are not cached by default. Implementing a resolved layout cache returns the already-resolved layout during PDP and PLP transitions, avoiding redundant CMS resolutions and expensive API calls.

Does deco-cms-layout-caching work with VTEX storefronts?

Deco-cms-layout-caching targets Deco Start powered storefronts with layout-heavy headers, footers, and theme sections. It uses edge-caching and multi-layer caching strategies to minimize repeated CMS resolutions and API calls during PDP and PLP navigations.

What are the limitations of layout caching in dev-mode?

The main limitation of layout caching in dev-mode involves built-in dev-mode guards that prevent stale data during development. These guards ensure the TTLs and page inflight dedup mechanisms do not interfere with local layout modifications and testing.