http-cache

Generate an HTTP caching layer with Cache-Control parsing and ETag validation.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/mazicimert/RunDom --skill http-cache-mazicimert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: http-cache
Source: https://github.com/mazicimert/RunDom/tree/main/.claude/skills/generators/http-cache
Command: npx skills add https://github.com/mazicimert/RunDom --skill http-cache-mazicimert

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generating an HTTP caching layer helps reduce API calls, enable offline behavior, and provide a consistent cache strategy for mobile and web clients.

Core Features & Use Cases

  • Parse and enforce Cache-Control directives (max-age, stale-while-revalidate, no-store, etc.) to govern caching behavior.
  • Manage ETag/Last-Modified validation and conditional requests to minimize data transfer.
  • Support offline fallback and stale-while-revalidate to improve perceived responsiveness.
  • Enable per-endpoint cache policies via a simple configuration to tailor caching per API endpoint.

Quick Start

Run the generator to produce a production HTTP caching layer configured for your networking code.

Frequently Asked Questions about http-cache

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

FAQPage Schema
How do I implement stale-while-revalidate and offline fallback in a Swift networking layer?

You can implement stale-while-revalidate and offline fallback by generating an HTTP caching layer that uses disk and memory caches with LRU eviction, providing immediate cached responses while updating data in the background.

How does ETag and Last-Modified validation work for conditional API requests?

ETag and Last-Modified validation works by sending conditional requests with If-None-Match headers to check if cached data is stale, minimizing data transfer by returning a lightweight response when the server content remains unchanged.

What's the best way to enforce per-endpoint Cache-Control policies in a mobile app?

The best way to enforce per-endpoint Cache-Control policies is to generate a caching layer that parses directives like max-age and no-store, allowing you to tailor specific caching behaviors for each individual API endpoint via configuration.

Can I integrate an HTTP caching layer with an existing API client?

Yes, you can integrate an HTTP caching layer with an existing API client by using a decorator pattern, which wraps your current networking code to intercept requests and apply cache policies without requiring a full rewrite.

When do I need disk and memory caching with LRU eviction for HTTP requests?

You need disk and memory caching with LRU eviction when managing HTTP requests in mobile apps or web clients, as it efficiently stores retrieved data locally to reduce redundant API calls and support offline behavior.

Why does my mobile app make redundant API calls instead of using cached responses?

Your app makes redundant API calls because it lacks a proper HTTP caching layer that parses Cache-Control headers and stores responses in a disk and memory cache, failing to serve repeated requests from local storage.