redis-mysql-store

0.3.9 • Public • Published

Simple Redis & Mysql client keystore with built-in caching

Why Use This Library?

caching data is really important for apps that require low-latency, such as games. it has never been easier to do this!

Installation:

npm install redis-mysql-store

Example Usage:

const Database = require("redis-mysql-store").default;
//import Database from "redis-mysql-store";

const db = new Database({
    redisURI: "",
    sqlURI: "",
    config: {
        debug: true,
        redisAutoTempFlushInterval: 60*60, // auto removes all keys starting with temp: on this interval. (ms) - manually called from client
        defaultExpire: 400 // otherwise default expire (timeout handled by server)
    }
});

now you can use db.set, db.get, db.delete, db.redis, db.sql and/or even interact directly with the client (MYSQL2 CONNECTION/REDIS CLIENT). (db.mysqlClient, db.redisClient).

find more options and config from types.

Happy Coding! <3

Readme

Keywords

none

Package Sidebar

Install

npm i redis-mysql-store

Weekly Downloads

1

Version

0.3.9

License

none

Unpacked Size

12.4 kB

Total Files

5

Last publish

Collaborators

  • nan481