add-caching

Cache Remix route loader data on the client with remix-client-cache.

4|Updated Oct 24, 2025
One-click install
npx skills add https://github.com/tech-with-seth/iridium --skill add-caching
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-caching
Source: https://github.com/tech-with-seth/iridium/tree/main/.github/skills/add-caching
Command: npx skills add https://github.com/tech-with-seth/iridium --skill add-caching

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reduces duplicate data fetches by caching route data on the client.

Core Features & Use Cases

  • SWR-style caching: Returns stale data immediately and refreshes in the background.
  • Cross-page data reuse: Caches loader data across navigations to avoid repeated fetches.
  • Easy integration: Works with app entry point and route loaders using remix-client-cache.

Quick Start

Configure global storage in app/entry.client.tsx, create a cached client loader with createClientLoaderCache, and hydrate components to consume cached data across navigations using useCachedLoaderData or CacheRoute.

Frequently Asked Questions about add-caching

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

FAQPage Schema
How do I cache Remix loader data on the client to reduce duplicate fetches?

To cache Remix loader data on the client, configure the remix-client-cache library storage in app/entry.client.tsx and use createClientLoaderCache to cache route loaders, which avoids repeated data fetches across navigations.

What is SWR-style caching and how does it work for Remix route data?

SWR-style caching for Remix route data returns stale cached data immediately for instant UI rendering while simultaneously refreshing the data in the background, ensuring cross-page data reuse without waiting for network requests.

Does client-side caching work with Remix dashboards and list views?

Yes, client-side caching works effectively with Remix dashboards and list views. It targets scenarios where loader data is requested across navigations, caching this data client-side to prevent duplicate fetches during repeated route transitions.

What's the best way to reuse data across navigations in a Remix app?

The best way to reuse data across navigations in a Remix app is using the remix-client-cache library to hydrate components with useCachedLoaderData or CacheRoute, which caches loader data on the client for cross-page reuse.

Do I need to configure app/entry.client.tsx to use remix-client-cache?

Yes, you need to configure global storage in app/entry.client.tsx to use remix-client-cache. This setup is required before creating cached client loaders and hydrating components to consume cached data across navigations.