nodejs-api-client-caching
CommunityNode.js API client caching pattern
Authorcsharpfritz
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill provides a robust pattern for building Node.js API clients that efficiently manage data fetching and caching, minimizing external dependencies and ensuring data freshness.
Core Features & Use Cases
- TTL-based Caching: Implements a Time-To-Live cache to store API responses, reducing redundant requests.
- Zero/Low Dependency: Utilizes Node.js's built-in
httpsmodule, avoiding issues withfetchpolyfills in CommonJS environments. - Forced Refresh & Invalidation: Allows for cache busting and manual cache clearing.
- Graceful Pagination: Handles paginated API results with error resilience.
- Use Case: Building a VS Code extension that frequently fetches data from a GitHub API, ensuring the UI remains responsive and data is up-to-date without overwhelming the API.
Quick Start
Implement the provided TypeScript code to create a Node.js API service with TTL caching.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: nodejs-api-client-caching Download link: https://github.com/csharpfritz/SquadUI/archive/main.zip#nodejs-api-client-caching Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.