Skip to content

v0.1.11 - npm Command Caching

Latest

Choose a tag to compare

@bigcheburashka bigcheburashka released this 14 Mar 21:36
· 13 commits to main since this release

⚡ Performance: npm Command Caching

New Feature

  • npm outdated cache: 24h TTL
  • npm audit cache: 6h TTL (shorter for security)
  • Cache stored in .dev-optimizer/ directory

Speed Improvement

Run Before After
First run ~9s ~9s
Second run ~9s ~0.01s

Implementation

// New file: src/utils/npm-cache.ts
export function getCachedOutdated(projectPath: string)
export function setCachedOutdated(projectPath: string, data)
export function getCachedAudit(projectPath: string)
export function setCachedAudit(projectPath: string, data)

Files Changed

  • src/utils/npm-cache.ts (new)
  • src/analyzers/DepsAnalyzer.ts (integrated caching)

Install:

npm install -g dev-optimizer
npx dev-optimizer analyze