@mashroom/mashroom-memory-cache-provider-redis v2.6.1
Mashroom Memory Cache Redis Provider
Plugin for Mashroom Server, a Microfrontend Integration Platform.
This plugin adds a Redis based provider for the mashroom-memory-cache.
Usage
If node_modules/@mashroom is configured as plugin path just add @mashroom/mashroom-memory-cache-provider-redis as dependency.
To activate this provider configure the Mashroom Memory Cache plugin like this:
{
"plugins": {
"Mashroom Memory Cache Redis Provider": {
"provider": "Mashroom Memory Cache Redis Provider",
"defaultTTLSec": 10
}
}
}
And configure this plugin like this in the Mashroom config file:
{
"plugins": {
"Mashroom Memory Cache Redis Provider": {
"redisOptions": {
"host": "localhost",
"port": "6379",
"keyPrefix": "mashroom:cache:"
}
}
}
}
- redisOptions: Passed to the Redis constructor of ioredis
Checkout out the ioredis documentation for all available options.
Usage with Sentinel
For a high availability cluster with Sentinel the configuration would look like this:
{
"plugins": {
"Mashroom Memory Cache Redis Provider": {
"redisOptions": {
"sentinels": [
{ "host": "localhost", "port": 26379 },
{ "host": "localhost", "port": 26380 }
],
"name": "myMaster",
"keyPrefix": "mashroom:cache:"
}
}
}
}
- sentinels: List of sentinel nodes to connect to
- name: Identifies a group of Redis instances composed of a master and one or more slaves
Checkout out the Sentinel section of the ioredis documentation for all available options.
Usage with a cluster
For a sharding cluster configure the plugin like this:
{
"plugins": {
"Mashroom Memory Cache Redis Provider": {
"cluster": true,
"clusterNodes": [
{
"host": "redis-node1",
"port": "6379"
},
{
"host": "redis-node2",
"port": "6379"
}
],
"clusterOptions": {
"maxRedirections": 3
},
"redisOptions": {
"keyPrefix": "mashroom:cache:"
}
}
}
}
- cluster: Enables cluster support, must be true
- clusterNodes: Cluster start nodes
- clusterOptions: Passed as second argument of the Redis.Cluster constructor of ioredis
- redisOptions: Passed as redisOptions in the clusterOptions
Checkout out the Cluster section of the ioredis documentation for all available options.
22 hours ago
1 month ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
10 months ago
6 months ago
8 months ago
11 months ago
11 months ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago