The standard options supported for all LaunchDarkly Redis features, including both options for Redis itself and others related to the SDK's behavior.
Configures a big segment store backed by a Redis instance.
"Big segments" are a specific type of user segments. For more information, read the LaunchDarkly documentation about user segments: https://docs.launchdarkly.com/home/users/segments
Configures a feature store backed by a Redis instance.
For more details about how and why you can use a persistent feature store, see the Using Redis as a persistent feature store.
For backward compatibility, this function supports both an older syntax that uses multiple parameters and a newer one that uses an LDRedisOptions object. The newer style is preferred, for clarity:
const store = RedisFeatureStore(
{
redisOpts: { host: 'redishost', port: 6379 },
prefix: 'app1',
cacheTTL: 30
});
The equivalent in the older syntax (which will be dropped in a future version) would be:
const store = RedisFeatureStore(
{ host: 'redishost', port: 6379 },
30,
'app1'
);
Optional configuration parameters to be passed to the redis
package.
The amount of time, in seconds, that recently read or updated items should remain in an in-memory cache. If it is zero, there will be no in-memory caching.
A string that should be prepended to all Redis keys used by the feature store.
A custom logger for warnings and errors. If not specified, it will use whatever the SDK's logging configuration is.
Pass this parameter if you already have a Redis client instance that you wish to reuse. In this case,
redisOpts
will be ignored.
A factory function that the SDK will use to create the data store. Put this value into the
featureStore
property of [[LDOptions]].
Configures a feature store backed by a Redis instance.
For more details about how and why you can use a persistent feature store, see the Using Redis as a persistent feature store.
For backward compatibility, this function supports both an older syntax that uses multiple parameters and a newer one that uses an LDRedisOptions object. The newer style is preferred, for clarity:
const store = RedisFeatureStore(
{
redisOpts: { host: 'redishost', port: 6379 },
prefix: 'app1',
cacheTTL: 30
});
The equivalent in the older syntax (which will be dropped in a future version) would be:
const store = RedisFeatureStore(
{ host: 'redishost', port: 6379 },
30,
'app1'
);
A factory function that the SDK will use to create the data store. Put this value into the
featureStore
property of [[LDOptions]].
Generated using TypeDoc
Configures a big segment store backed by a Redis instance.
"Big segments" are a specific type of user segments. For more information, read the LaunchDarkly documentation about user segments: https://docs.launchdarkly.com/home/users/segments