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

@pixel-pulse/next-cache-brain-devtools

v0.5.1

Published

Visual debugger for next-cache-brain

Downloads

998

Readme

npm version License: MIT


✨ Features

  • Atomic Pulse Engine: Unified API supporting SWR, Cache-First, and Network-First strategies with a single function call.
  • Visual Diagnostics: Real-time DevTools to track TTL, Registry Hits, and Deduplication events as they happen.
  • Event Bridge: Reactive synchronization ensuring that when data updates in one component, the entire UI stays in sync.
  • App Router Native: Deeply optimized for Next.js Server Components, Actions, and high-performance client hydration.

⚠️ Beta Version Notice

This project is currently in v0.5.1-beta. We are actively refining the Registry Pulse logic and synchronization performance.

  • Please report any bugs via GitHub Issues.
  • Expect breaking changes until version 1.0.0.

📦 Installation

Install the core engine and the visual diagnostic suite:

npm install @pixel-pulse/next-cache-brain-core @pixel-pulse/next-cache-brain-devtools

Quick Start Guide

1. Global Registry Setup

To enable real-time synchronization and the Visual Debugger, wrap your application in the CacheBrainProvider within your layout.tsx.

// app/layout.tsx
import {
  CacheBrainProvider,
  CacheBrainDevtools,
} from "@pixel-pulse/next-cache-brain-devtools";

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en">
      <body>
        <CacheBrainProvider>
          {children}

          {/* Diagnostic overlay active in development */}
          <CacheBrainDevtools
            enabled={process.env.NODE_ENV === "development"}
          />
        </CacheBrainProvider>
      </body>
    </html>
  );
}

2. Server-Side Implementation

Use smartCache in your Server Components for high-performance data fetching with automatic deduplication.

// app/layout.tsx
import { smartCache } from "@pixel-pulse/next-cache-brain-core";

async function Profile({ id }) {
  const user = await smartCache(
    ["user-profile", id], // Unique Cache Key
    () => fetch(`https://api.pulse.tech/users/${id}`).then((res) => res.json()),
    {
      strategy: "cache-first",
      ttl: 60000, // 60 seconds
    },
  );

  return <div>{user.name}</div>;
}

3. Client-Side Reactivity

Use the useSmartCache hook to create reactive UIs that stay synchronized across your entire application via the Event Bridge.

// app/layout.tsx
import { smartCache } from "@pixel-pulse/next-cache-brain-core";

async function Profile({ id }) {
  const user = await smartCache(
    ["user-profile", id], // Unique Cache Key
    () => fetch(`https://api.pulse.tech/users/${id}`).then((res) => res.json()),
    {
      strategy: "cache-first",
      ttl: 60000, // 60 seconds
    },
  );

  return <div>{user.name}</div>;
}

Caching Strategies

| Strategy | Behavior | Best For | | :-------------- | :---------------------------------------------------------- | :--------------------------- | | cache-first | Returns cached data if valid; fetches only on miss. | Static content, settings. | | swr | Returns cached data immediately; revalidates in background. | Dashboards, Social feeds. | | network-first | Attempts fresh fetch; falls back to cache on failure. | Critical real-time data. | | no-cache | Bypasses registry but tracks request in DevTools. | Testing, Non-cacheable hits. |


Resources & Navigation

Explore the ecosystem and learn how to optimize your application's data pulse: