Caching & Performance Optimization

Implement caching strategies across database, application, HTTP, and network layers.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/DoanNgocCuong/working --skill caching-performance-optimization
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Caching & Performance Optimization
Source: https://github.com/DoanNgocCuong/working/tree/main/3.2%20%5BSTRUCTURES%20-%20B-%20MILESTONES%5D/3.2.1%20%5BMONEYGAME%5D/3.2.1.1%20KI%E1%BA%BEM%20TI%E1%BB%80N%20-%20SKILL/your_project/docs/4-production-quality/5.16%20-%20SPECIALIZED%20-%20Caching%20%26%20Performance%20Optimization
Command: npx skills add https://github.com/DoanNgocCuong/working --skill caching-performance-optimization

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the critical need to improve application speed and reduce resource load by implementing effective caching strategies across various layers of a system.

Core Features & Use Cases

  • Cache Strategy Selection: Guides on choosing between Cache-Aside, Write-Through, Write-Behind, and Read-Through.
  • Cache Invalidation: Demonstrates time-based, event-based, and dependency-based invalidation techniques.
  • Distributed Caching: Best practices for using Redis, including cluster mode and eviction policies.
  • CDN & HTTP Caching: Configuration for static assets and proper HTTP cache headers.
  • Application & Database Caching: In-process caching, function-level caching, and query result caching.
  • Performance Profiling: Tools and techniques for identifying bottlenecks.
  • Use Case: A high-traffic e-commerce website experiencing slow load times can implement Redis caching for product catalogs and user sessions, significantly reducing database load and improving user experience.

Quick Start

Implement the cache-aside pattern to store and retrieve user profile data from Redis with a one-hour TTL.

Frequently Asked Questions about Caching & Performance Optimization

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

FAQPage Schema
How do I choose the right caching strategy for my application?▼

Choosing the right caching strategy requires evaluating your read/write ratio and data consistency needs. This Skill provides decision frameworks to select between cache-aside, write-through, write-behind, and read-through patterns for optimal performance.

How do I implement Redis caching for a high-traffic application?▼

Implement Redis caching by utilizing cluster mode and configuring appropriate eviction policies. This Skill covers distributed caching best practices, including connection pooling and cache stampede prevention to ensure high availability under heavy load.

What is the best way to handle cache invalidation?▼

The best way to handle cache invalidation is combining time-based, event-based, and dependency-based techniques. This Skill demonstrates how to apply these invalidation methods alongside TTL selection frameworks to maintain data consistency without sacrificing performance.

How do I configure HTTP caching headers and CDN for static assets?▼

Configure HTTP caching headers and CDN by setting proper cache-control directives for static assets. This Skill provides detailed guidance on CDN configuration and HTTP header optimization to reduce latency and minimize redundant server requests.

How can I identify performance bottlenecks before implementing caching?▼

Identify performance bottlenecks by using application profiling techniques to measure latency and resource load. This Skill includes profiling tools and optimization prioritization frameworks to pinpoint exactly where caching will yield the highest performance gains.

How do I prevent cache stampedes when using distributed caching?▼

Prevent cache stampedes by implementing stampede protection techniques during high-traffic cache misses. This Skill covers strategies to avoid thundering herd problems in distributed caching environments, ensuring stable application performance under peak load.