5.3.1 • Published 2 months ago

@themost/redis v5.3.1

Weekly downloads
11
License
BSD-3-Clause
Repository
github
Last release
2 months ago

@themost/redis

Most Web Framework Redis Cache Module

@themost/redis implements the usage of Redis as caching strategy of a MOST Web Framework application.

Installation

npm i @themost/redis

Configuration

Add settings/redis configuration section in your application configuration.

    {
        "settings": {
            "redis": {
                "options": {
                    "host": "127.0.0.1",
                    "port": 6379
                },
                "pool": {
                    "min": 2,
                    "max": 25
                }
            }
        }
    }

The sectionredis/options contains options about configuring the connection to the Redis server.

Read more about connect options at ioredis

Connection pooling

@themost/redis uses generic-pool for connection pooling. Configure redis/pool section to set minimum and maximum number of connections to be used.

Read about connection pooling options at generic-pool

Usage

Configure application services to use RedisCacheStrategy as caching service.

{
    "services": [
        {
            "serviceType": "@themost/data#DataCacheStrategy",
            "strategyType": "@themost/redis#RedisCacheStrategy"
        }
    ]
}
5.3.1

2 months ago

5.3.0

2 months ago

4.6.0

2 months ago

4.1.0

1 year ago

4.1.1

1 year ago

2.0.4

4 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago