feat: add stateless binary response caching for conversion endpoints#13
Conversation
…and cache behavior
|
@cursor review |
|
Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings. |
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Free Tier Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| break; | ||
| } | ||
|
|
||
| await cacache.rm.entry(env.CACHE_DIR, oldest.key); |
There was a problem hiding this comment.
Cache eviction never frees disk space
High Severity
All eviction paths (enforceCacheRetention, expired-entry removal in getCachedOutput) call cacache.rm.entry, which only deletes the index entry — the content-addressable blob remains on disk. Neither cacache.rm.content nor cacache.verify is ever called, so CACHE_MAX_SIZE_MB is effectively unenforced on the filesystem. Disk usage grows monotonically and is never reclaimed, which can eventually fill the volume.
Additional Locations (1)
|
🎉 This PR is included in version 1.2.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |


Summary
Adds optional stateless, filesystem-backed caching for binary conversion responses in the server.
cacache-based cache utility with TTL + size-cap retentionprocessMediaJob()and serves cache hits before queueing workuploadToS3//urlflows and/media/infoCACHE_*env/config/docs (CACHE_ENABLED,CACHE_DIR,CACHE_TTL_HOURS,CACHE_MAX_SIZE_MB)Test Coverage
npm run typecheck,npm run test:app, andnpm run test:integration(all passing).