hapijs / catbox-redis

Redis adapter for catbox
Other
69 stars 63 forks source link

Cluster-awareness #124

Open einar-hjortdal opened 2 years ago

einar-hjortdal commented 2 years ago

I am running hapi 20. Following the documentation, the following configuration works fine on a single-instance redis server.

const Hapi = require('hapi')
const CatboxRedis = require('@hapi/catbox-redis');

const server = new Hapi.Server({
    cache : [
        {
            name: 'my_cache',
            provider: {
                constructor: CatboxRedis,
                options: {
                    partition : 'test',
                    host: 127.0.0.1,
                    port: 6379,
                    db: 0,
                }
            }
        }
    ]
});

Is this configuration also cluster-aware (does it get redirected)? Or do I need to change the configuration to interface with a cluster?