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

@theyahia/claude-webcache

v0.1.5

Published

Cross-session WebFetch cache for Claude Code. WebFetches disappear after 15 minutes — claude-webcache makes them persist.

Readme

claude-webcache

npm npm downloads license

Persistent cross-session WebFetch cache for Claude Code. 5-15× fewer WebFetch calls on repeated URLs.

Claude Code's built-in cache lasts 15 minutes, within one session. Every new session re-fetches from scratch. claude-webcache persists results across sessions in a local SQLite database — instant cache hits, zero network cost.

Session 1  →  WebFetch("docs.example.com")  →  fetched, stored
Session 2  →  cached_fetch("docs.example.com")  →  instant hit, no network call
Session 7  →  cached_fetch("docs.example.com")  →  still instant, 7-day TTL

CACHE_MISS flow: WebFetch + cache_store in first session CACHE_HIT flow: instant hit, no WebFetch in second session

Install

claude plugin marketplace add theYahia/claude-webcache && claude plugin install claude-webcache@theyahia

Works in: Claude Code CLI · Desktop (Mac/Windows) · VS Code extension · JetBrains plugin — same command everywhere.

Then add the usage pattern to ~/.claude/CLAUDE.md (20 seconds).

Plugin TUI not working? There's an open Claude Code bug (#41653) where /plugin install rejects third-party sources with "source type not supported." Use the CLI command above — it bypasses the TUI and works fine.

Fallback (no marketplace):

git clone https://github.com/theYahia/claude-webcache && claude --plugin-dir ./claude-webcache/plugin

Option 2 — npm global

npm i -g @theyahia/claude-webcache

Requires Node.js 22.5+ (uses built-in node:sqlite — no native deps, no install step).

Then register in ~/.claude/settings.json (replace path with output of npm root -g):

{
  "mcpServers": {
    "claude-webcache": {
      "command": "node",
      "args": ["/path/from/npm-root-g/claude-webcache/scripts/mcp-server.cjs"]
    }
  },
  "hooks": {
    "SessionStart": [
      {
        "matcher": "startup|clear|compact",
        "hooks": [
          { "type": "command", "command": "node /path/from/npm-root-g/claude-webcache/scripts/hook-stats.cjs" }
        ]
      }
    ]
  }
}

Option 3 — clone (contributors)

See CONTRIBUTING.md.

Usage pattern

Add this to ~/.claude/CLAUDE.md:

## WebFetch caching (claude-webcache)

Before calling WebFetch, call `cached_fetch(url, prompt)` first.
- If it returns text → use that, do NOT call WebFetch.
- If it returns `[CACHE_MISS] <url>` → call WebFetch as normal, then call `cache_store(url, prompt, output)` with the result.

That's it. Same URL + same prompt in any future session = instant hit.

Tools (MCP)

| Tool | Args | Returns | |---|---|---| | cached_fetch | url, prompt | cached text, or [CACHE_MISS] <url> | | cache_store | url, prompt, output | stored | | cache_stats | — | { total, hits, last } | | cache_list | limit? | recent URLs (most recent first) |

SessionStart hook

Every new session injects a one-liner so Claude knows the cache exists:

webcache: 142 pages cached, 38 hits, last fetch 3h ago

No output if cache is empty.

Storage

SQLite at ~/.webcache/cache.db (WAL mode, concurrent-safe).
Cache key = SHA256(url + "|" + prompt). Default TTL: unlimited (set WEBCACHE_TTL_DAYS=N for N-day expiry).

| Field | Type | |---|---| | key | TEXT PRIMARY KEY | | url | TEXT | | prompt_hash | TEXT | | output | TEXT | | cached_at | INTEGER (ms epoch) | | hit_count | INTEGER | | last_hit_at | INTEGER |

Limits

  • Cache key includes the prompt — use consistent prompts to maximize hit rate.
  • Output is whatever WebFetch returns (already summarized). No re-processing.
  • No semantic search. Exact (url, prompt) match only.

Related

  • claude-mem — persistent memory across sessions (complements claude-webcache: memory vs. web cache)
  • WWmcp — catalog of 120+ MCP servers for non-Western APIs

License

MIT — see LICENSE.