npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lxgicstudios/cache-audit

v1.0.0

Published

Audit HTTP cache headers for any URL. Check Cache-Control, ETag, Expires, Vary. Detect missing headers, conflicting directives, suboptimal TTLs. Get platform-specific fix suggestions for Nginx, Vercel, and Cloudflare.

Readme

@lxgicstudios/cache-audit

npm version license node

Audit HTTP cache headers for any URL. Checks Cache-Control, ETag, Expires, and Vary headers. Detects missing headers, conflicting directives, and suboptimal TTLs. Gives you platform-specific fix suggestions for Nginx, Vercel, and Cloudflare.

Zero dependencies. Just Node.js built-ins.

Install

npm install -g @lxgicstudios/cache-audit

Or run directly with npx:

npx @lxgicstudios/cache-audit https://example.com

Usage

# Audit a single URL
cache-audit https://example.com

# Crawl and audit all linked resources (CSS, JS, images)
cache-audit https://example.com --crawl

# Get JSON output for CI/CD pipelines
cache-audit https://example.com --json

# Verbose mode shows all headers
cache-audit https://example.com --verbose

Features

  • Analyzes Cache-Control directives and TTL values
  • Checks ETag presence and format (weak vs strong)
  • Validates Expires header dates and detects conflicts
  • Audits Vary header for problematic values
  • Detects missing cache headers that hurt performance
  • Warns about conflicting directives (no-store + max-age, public + private)
  • Scores your caching setup out of 100
  • Platform-specific fix suggestions for Nginx, Vercel, and Cloudflare
  • Crawl mode checks all linked resources on a page
  • Zero external dependencies

Options

| Option | Description | Default | |--------|-------------|---------| | --crawl | Crawl and check all linked resources | false | | --json | Output results as JSON | false | | --verbose | Show all headers, not just cache-related | false | | --timeout <ms> | Request timeout in milliseconds | 10000 | | --help | Show help message | |

What It Checks

| Header | What's Checked | |--------|---------------| | Cache-Control | Conflicting directives, TTL analysis, missing immutable | | ETag | Presence, weak vs strong format | | Expires | Valid date, past dates, conflicts with Cache-Control | | Vary | Wildcard usage, User-Agent proliferation | | Last-Modified | Presence for conditional requests | | Pragma | Unnecessary HTTP/1.0 headers | | Age | CDN cache status |

Example Output

cache-audit v1.0.0

Auditing https://example.com...

URL: https://example.com
Status: 200
Score: 72/100

Cache Headers:
  cache-control: max-age=3600
  etag: "5f3b5c6e-1f4"

Issues:
  ⚠ [Cache-Control] max-age=3600 on a static asset without "immutable".
  ℹ [ETag] Weak ETag detected: W/"5f3b5c6e-1f4".
  ⚠ [Vary] Consider adding Accept-Encoding to Vary.

License

MIT - LXGIC Studios