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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@studentivan/cache-handler

v1.8.2

Published

Next.js self-hosting simplified.

Downloads

76

Readme

@neshca/cache-handler with next15 branch merged

Flexible API for replacing the default Next.js cache, enabling custom caching solutions for multi-instance self-hosted deployments.

npm package Dependencies License

Latest Release

🎉 Version 1.8.0 has been released! It now includes the neshClassicCache function ↗, that allows you to cache the results of expensive operations in the getServerSideProps and API routes.

Do not forget the registerInitialCache instrumentation hook ↗, that allows the cache to be pre-populated with the initial data when the application starts.

Check out the changelog for more details.

Table of Contents

  1. Overview
  2. Getting Started
  3. Examples
  4. Requirements
  5. Documentation
  6. Contributing
  7. License

Overview

Welcome to @neshca/cache-handler (pronounced /ˈnæʃkʌ/), a specialized ISR/Data cache API crafted for Next.js applications. This library simplifies configuring shared cache strategies in distributed environments, such as multiple, independent application instances. It offers a flexible and easy-to-integrate solution for custom cache strategies, especially for Redis.

Features

  • Shared Cache for Distributed Environments: Perfect for self-hosted deployments with multiple application instances.
  • Easy Customization: Provides a straightforward API with pre-configured Handlers.
  • On-Demand Revalidation: Simplifies revalidation across all application replicas.
  • TTL Management: Automatic cache cleanup to keep storage space efficient.
  • Support for Next.js Routers: Full support and one setup for the Pages and the App Router.
  • neshCache Function: Utilize the neshCache function to replace unstable_cache for more control over caching.
  • neshClassicCache Function: Use the CacheHandler in the Pages Router to cache the result of expensive operations in the getServerSideProps and API routes.
  • Pre-populate the Cache with Initial Data: Automatically pre-populate the cache with the initial data when the application starts using the instrumentation hook ↗.

Getting Started

Enhance your application's caching with our Installation and First Steps Guide. This guide covers installation, basic configuration, and practical examples for quick integration.

Examples

Explore the versatility of @neshca/cache-handler in our Examples Section with real-world scenarios. Learn how to build a custom Handler by following this guide.

Requirements

  • Next.js: 13.5.1 or newer.
  • Node.js: 18.17.0 or newer.

Documentation

For detailed documentation, visit our Documentation Page.

Contributing

We welcome contributions! Check out our Contributing Guide for more information.

License

This project is licensed under the MIT License.