caching-and-performance

Configure HTTP caching, compression, and resilience patterns for API performance.

28|3|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/oborchers/fractional-cto --skill caching-and-performance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: caching-and-performance
Source: https://github.com/oborchers/fractional-cto/tree/main/api-design-principles/skills/caching-and-performance
Command: npx skills add https://github.com/oborchers/fractional-cto --skill caching-and-performance

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses API performance bottlenecks by guiding the implementation of effective caching strategies, compression, and resilience patterns, ensuring faster response times and reduced server load.

Core Features & Use Cases

  • HTTP Caching: Configure Cache-Control headers, ETags, and conditional requests.
  • CDN Optimization: Implement strategies for effective API caching at the edge.
  • Compression & Protocols: Utilize gzip, Brotli, and HTTP/2 or HTTP/3 for efficient data transfer.
  • Resilience Patterns: Implement circuit breakers and connection pooling to prevent cascading failures.
  • Use Case: When designing a new API endpoint for product listings, use this Skill to ensure appropriate Cache-Control headers and s-maxage are set for CDN caching, and that stale-while-revalidate is configured to improve perceived performance.

Quick Start

Configure the Cache-Control header for a public product catalog endpoint with a 24-hour CDN TTL and a 5-minute browser TTL.

Frequently Asked Questions about caching-and-performance

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

FAQPage Schema
How do I configure Cache-Control headers for CDN caching and browser TTL?

Configure Cache-Control headers by setting s-maxage for CDN caching TTL and max-age for browser TTL. This ensures effective API caching at the edge, reducing server load and improving response times. You can also add stale-while-revalidate to improve perceived performance.

What's the best way to implement API resilience patterns to prevent cascading failures?

Implement API resilience patterns like circuit breakers and connection pooling to prevent cascading failures. These strategies maintain system stability by failing fast and reusing existing connections, ensuring high throughput during traffic spikes.

How does Brotli compression compare to gzip for HTTP API response optimization?

Brotli compression and gzip both optimize HTTP API response data transfer. Brotli generally achieves higher compression ratios, while gzip offers broader compatibility. Utilizing either protocol strategy reduces latency and improves API speed.

When do I need ETags and conditional requests for HTTP caching?

You need ETags and conditional requests for HTTP caching when validating resource freshness without transferring full payloads. This mechanism conserves bandwidth and reduces server load by returning 304 Not Modified responses for unchanged API resources.

Does HTTP/2 or HTTP/3 adoption improve API throughput and low latency?

HTTP/2 and HTTP/3 adoption improves API throughput and low latency through multiplexing and reduced connection overhead. Upgrading to these protocols ensures efficient data transfer and optimized network resource usage for high-performance APIs.