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

@neriros/dcache

v0.7.1

Published

A distributed task cache for shell commands and Nx tasks. Hashes your source files and the lockfile, then replays the cached stdout/stderr/exit code on a hit so the task never runs twice for the same inputs.

Readme

@neriros/dcache

A distributed task cache for shell commands and Nx tasks. Hashes your source files and the lockfile, then replays the cached stdout/stderr/exit code on a hit so the task never runs twice for the same inputs.

Install

npm i -g @neriros/dcache
# or
bun add -g @neriros/dcache

Requires Node.js >= 18.

Usage

Glob mode — cache any shell command

Hash the files matched by --glob (plus the detected lockfile and the command itself). On a hit, the original stdout/stderr/exit code are replayed:

dcache run "tsc --noEmit" --glob "src/**/*.ts"
dcache run "eslint ." --glob "src/**/*.{ts,tsx}"

Excluding files with --ignore

Use --ignore (repeatable) to drop paths from the hash input. This is essential for shared caches: any file that exists on one machine but not another (build outputs, local artifacts, generated debug bundles) will produce different hashes and force misses. Exclude them so the hash only depends on tracked source.

dcache run "eslint ." \
  --glob "{apps,libs}/**/*.{ts,tsx,js,mjs}" \
  --ignore "**/dist/**" \
  --ignore "**/.vercel/**" \
  --ignore "**/coverage/**"

The ignore patterns are also part of the cache-key manifest, so changing them invalidates the cache rather than silently reusing a stale entry.

Nx mode

dcache run build --project my-app

Nx mode is wired into the CLI but the project-graph integration is still landing — prefer glob mode today.

Clear the cache

dcache clear

Help

dcache --help

How it works

  1. Resolve the input files (glob or Nx project graph).
  2. Compute a content hash over: each file, the detected lockfile (bun.lock, package-lock.json, pnpm-lock.yaml, yarn.lock), and a manifest of the task itself (command + args).
  3. Look the hash up in the cache.
    • Hit: replay the stored stdout/stderr and exit with the stored code.
    • Miss: run the task, stream output, and store the result.

Because the hash includes the lockfile, dependency upgrades automatically invalidate stale entries.

Configuration

Configuration lives in dcache.config.json in the current working directory. If no file is present, the defaults below are used.

| Key | Type | Default | |---|---|---| | cacheDir | string | node_modules/.cache/dcache | | logLevel | "debug" \| "info" \| "warn" \| "error" | "info" | | envFile | string (path) | — | | ignore | string[] | [] | | respectGitignore | boolean | true | | provider | provider config (see below) | filesystem at cacheDir |

ignore patterns apply to every glob-mode run and are merged with any --ignore flags passed on the command line. Use this for paths that should always be excluded from the hash on this project (build outputs, local artifacts, etc.):

{
  "ignore": ["**/dist/**", "**/.vercel/**", "**/coverage/**", "**/.nx/**"]
}

respectGitignore (default true) restricts glob matches to files that are tracked or untracked-but-not-ignored by git, using git ls-files --cached --others --exclude-standard. This is the most reliable way to keep developer-machine artifacts (build outputs, local logs, scratch files) out of the cache hash so it matches a fresh CI checkout. Falls back to keeping all matched files (with a warning) when not in a git repo. Set to false to disable.

String values support ${ENV_VAR} interpolation. Use envFile to load a .env before interpolation runs — keeps secrets out of the config file.

Filesystem provider (default)

{
  "cacheDir": ".dcache",
  "logLevel": "debug",
  "provider": { "type": "filesystem" }
}

PostgreSQL provider

Shared/distributed backend across machines and CI runners. Requires pg in the host project (bun add pg or npm i pg).

{
  "envFile": ".env",
  "provider": {
    "type": "postgresql",
    "connectionString": "${DATABASE_URL}",
    "table": "dcache_entries"
  }
}

table is optional and defaults to dcache_entries.

License

MIT