@ai-sdk-tools/cache weekly downloads statistics
By ai-sdk-tools (5 listings) · npm · AI SDKs
Simple caching wrapper for AI SDK tools - cache expensive tool executions with zero configuration
@ai-sdk-tools/cache has 2,348 recorded weekly downloads on npm, a decrease of 50.9% over the past 30 days.
It ranks #1250 of 2,256 tracked npm listings by weekly downloads.
Over 90 days, weekly downloads changed by -67.5%.
PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.
About @ai-sdk-tools/cache
@ai-sdk-tools/cache
Universal caching wrapper for AI SDK tools. Cache expensive tool executions with zero configuration - works with regular tools, streaming tools, and artifacts.
Why Cache Tools?
AI agents repeatedly call expensive tools: • Same API calls across conversation turns (weather, translations) • Heavy calculations with identical parameters (financial analysis) • Database queries that don't change (user profiles, company data) • Streaming tools with complex artifact data (charts, metrics)
Caching provides: • 10x faster responses for repeated requests • 80% cost reduction by avoiding duplicate calls • Smooth agent conversations with instant cached results • Complete data preservation - streaming, artifacts, everything
Installation
Quick Start
Basic Usage (LRU Cache)
Result: First call hits the API, subsequent calls return instantly from cache!
Redis/Upstash Cache (Production)
Standard Redis
IORedis
Universal Redis Support
Works with any Redis client that implements: • get(key: string): Promise • set(key: string, value: string): Promise • del(key: string): Promise • setex?(key: string, seconds: number, value: string): Promise (optional)
Supported clients: • ✅ Upstash Redis - @upstash/redis • ✅ Standard Redis - redis • ✅ IORedis - ioredis • ✅ Redis Clusters - Any cluster client • ✅ Custom Redis clients - As long as they implement the interface
Configuration Options
Multi-Tenant Apps (Context-Aware Caching)
For apps with user/team context, just add getContext to the cache config:
Result: Cache keys automatically include teamId and userId - no collisions between users/teams!
Reusable Cache Configuration
For consistent setup across your app, create a configured cache function:
Streaming Tools with Artifacts
Multiple Tools
Custom Callbacks
Cache Statistics
API Reference
createCached(options?)
Creates a cached function with optional Redis client.
Parameters: • options.cache - Redis client (optional, defaults to LRU) • options.keyPrefix - Cache key prefix • options.ttl - Time to live in milliseconds • options.debug - Enable debug logging • options.onHit - Cache hit callback • options.onMiss - Cache miss callback
Returns: A function that wraps tools with caching
cached(tool, options?)
Basic caching function with automatic context detection.
Parameters: • tool - AI SDK tool to cache • options.cacheKey - Function to generate cache key context • options.ttl - Time to live in milliseconds • options.store - Cache store backend • options.debug - Enable debug logging • options.onHit - Cache hit callback • options.onMiss - Cache miss callback
cacheTools(tools, options?)
Cache multiple tools with the same configuration.
Contributing
Contributions are welcome! Please read our contributing guide for details.
License
MIT © AI SDK Tools
Description from the npm listing.
- ai
- ai-sdk
- tools
- cache
- caching
- performance
- llm
- openai
- anthropic
Where @ai-sdk-tools/cache sits in the listing
Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Recent observations
Full history (121)Similar npm AI SDKs plugins
Data source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@ai-sdk-tools/cache. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.