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

@strapi-community/plugin-redis

v2.0.0

Published

Plugin used to centralize management of Redis connections in Strapi

Downloads

275

Readme

Table of Contents

🚦 Current Status

This package is currently maintained and should be considered Stable/GA in terms of state. I/We are currently accepting contributions and/or dedicated contributors to help develop and maintain this package.

For more information on contributing please see the contrib message below.

🛑 Foreword

This package's lead maintainer is an employee of Strapi however this package is not officially maintained by Strapi Solutions SAS nor Strapi, Inc. and is currently maintained in the free time of the lead maintainer.

[!WARNING] Absolutely no part of this code should be considered covered under any agreement you have with Strapi proper including but not limited to any Enterprise and/or Cloud Agreement you have with Strapi.

✨ Features

This plugin utilizes 2 core packages:

  • ioredis - for all connection management to any Redis or Redis-compatible database
  • redlock - for distributed locks related to Strapi's built in cron-tasks system

These are the primary features that are finished or currently being worked on:

  • [ ] Updated/New Documentation outside of this README
  • [x] Multiple connections/databases
  • [x] Redlock capabilities with Strapi's built-in cron tasks
  • [ ] Admin Panel interface to see all existing connections
  • [ ] Admin Panel interface to see the stored key/values within the connections
  • [ ] Admin Panel interface to see the current server statistics

🤔 Motivation

The purpose of this package is to have a universal Redis connector for all packages wanting to utilize a Redis database and/or for those wanting to develop custom functions and code within your Strapi project and would prefer a centralized Redis database for various purposes.

A few examples of where Redis could be used within a Strapi application:

  • LRU-based response cache for REST
  • Apollo server GraphQL cache
  • IP Rate-limiting using something like koa2-ratelimit
  • Server-side user session storage
  • So much more

If you are currently using this package in your plugin and would like to be featured, please feel free to submit an issue to have your plugin added to the list below:

Note the following packages used to use this package with Strapi v4 but have since been merged into this package:

🖐 Requirements

[!CAUTION] This plugin will not work with Strapi v3 projects as it utilizes APIs that don't exist in the v3!

Supported Strapi Versions:

| Strapi Version | Plugin Version | Supported | Tested On | |----------------|----------------|-----------|-----------| | v3.x.x | N/A | ❌ | N/A | | v4.x.x | 1.1.0 | ✅ | Sept 2024 | | v5.x.x | 2.0.0 | ✅ | Sept 2024 |

⏳ Installation

[!WARNING] For Strapi 4 projects you should use the 1.x.x version of this plugin, for Strapi 5 projects you should use the 2.x.x version of this plugin.

[!NOTE] For Strapi 5 the package name has changed from strapi-plugin-redis to @strapi-community/plugin-redis.

Install the plugin in your Strapi project or your Strapi plugin.

| Strapi Version | Plugin Version | Package Manager | Command | |----------------|----------------|-----------------|-------------------------------------------| | v4.x.x | 1.1.0 | Yarn | yarn add [email protected] | | v5.x.x | Latest | Yarn | yarn add @strapi-community/plugin-redis | | v4.x.x | 1.1.0 | npm | npm i [email protected] | | v5.x.x | Latest | npm | npm i @strapi-community/plugin-redis |

🔧 Configuration

See our Documentation for more information on how to configure and use this plugin.

Contributing

I/We are actively looking for contributors, maintainers, and others to help shape this package. As this plugins sole purpose within the Strapi community is to be used by other developers and plugin maintainers to help ease the connection to Redis databases.

Instead of reinventing the wheel every time you need to connect to Redis, the hope is to centralize the connections in a single plugin that all plugins can piggy back on.

If interested please feel free to open up a GitHub issue/PR or ping DMehaffy on Discord.

[!NOTE] This package is maintained collectively by the strapi community organization. While there may be a lead maintainer, they are not the sole maintainer of this code and this code does not belong to the lead maintainer.

License

See the LICENSE file for licensing information.