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

remember-me

v1.0.2

Published

No nonsense in-memory cache system for node

Readme

Remember Me

About

A simple in-memory caching solution with ttl expiry, and limit support! Each valued stored into the cache has its size calculated by JSON.stringify(data).length, the default character limit is 100 * 1024 * 1024 (or 104,857,600 characters). This can also be be adjusted if needed as explained in the notes below. The cache will reject the newest item you are trying to store, if the size of that item will make the total size exceed the limit.

Usage

In order to utilise this module you must first require it in your project like so: const cache = require('remember-me')

Store item

To store an item in the cache you must invoke cache.set, this accepts 4 parameters. The first is the key which must be provided in string format, the second is the data you wish to store which can be provided in any format, the third is an optional integer which is milliseconds until expiry, and the fourth is an optional callback which includes error information, or a success message. The below example, shows how you would store an object into the cache. cache.set('your-key', {someValue: true, someOtherValue: false})

This example will set some cache that will automatically delete itself after 10 seconds, and includes a callback cache.set('your-key', {someValue: true, someOtherValue: false}, 10000, (err, message) => { console.log(message) })

Get item

In order to fetch previously stored items from the cache you must invoke the cache.get function. This function accepts 2 parameters, the first is the key you want to fetch which must be provided as a string. The second is a callback which is required, please see the below example: cache.get('your-key', (err, data) => { console.log(data) })

Get multiple items, callback data is return as an array of data

cache.mget(['key-one', 'key-two', 'key-three'], (err, data) => { console.log(data) })

Get all item data, callback data is return as an array of data

cache.getAll((err, data) => { console.log(data) })

Get all item keys, callback data is return as an array of strings

cache.getAllKeys((err, data) => { console.log(data) })

Delete item

To delete cached items you must invoke the cache.del function. It accepts 2 parameters, the first is the key you wish to delete, and the second is an optional callback function. cache.del('your-key')

Utility functions

cache.info - This will return an object with information about the currently stored cache such as: amount of cached items, the total size of the cache, and the allowed cache size limit. cache.setMaxSize - With this function it is possible to increase the character limit of the cache.