@@ -144,11 +144,13 @@ class Redis:
144144 def new_feature_store (url : str = 'redis://localhost:6379/0' ,
145145 prefix : str = 'launchdarkly' ,
146146 max_connections : int = 16 ,
147- caching : CacheConfig = CacheConfig .default ()) -> CachingStoreWrapper :
147+ caching : CacheConfig = CacheConfig .default (),
148+ ** conn_options : Any ) -> CachingStoreWrapper :
148149 """
149150 Creates a Redis-backed implementation of :class:`~ldclient.interfaces.FeatureStore`.
150151 For more details about how and why you can use a persistent feature store, see the
151152 `SDK reference guide <https://docs.launchdarkly.com/sdk/concepts/data-stores>`_.
153+ `SDK reference guide <https://docs.launchdarkly.com/sdk/concepts/data-stores>`_.
152154
153155 To use this method, you must first install the ``redis`` package. Then, put the object
154156 returned by this method into the ``feature_store`` property of your client configuration
@@ -167,16 +169,19 @@ def new_feature_store(url: str='redis://localhost:6379/0',
167169 connection pool; defaults to ``DEFAULT_MAX_CONNECTIONS``
168170 :param caching: specifies whether local caching should be enabled and if so,
169171 sets the cache properties; defaults to :func:`ldclient.feature_store.CacheConfig.default()`
172+ :param conn_options: extra options for initializing Redis connection from the url,
173+ see `redis.connection.ConnectionPool.from_url` for more details.
170174 """
171- core = _RedisFeatureStoreCore (url , prefix , max_connections )
175+ core = _RedisFeatureStoreCore (url , prefix , max_connections , ** conn_options )
172176 wrapper = CachingStoreWrapper (core , caching )
173177 wrapper ._core = core # exposed for testing
174178 return wrapper
175179
176180 @staticmethod
177181 def new_big_segment_store (url : str = 'redis://localhost:6379/0' ,
178182 prefix : str = 'launchdarkly' ,
179- max_connections : int = 16 ) -> BigSegmentStore :
183+ max_connections : int = 16 ,
184+ ** conn_options : Any ) -> BigSegmentStore :
180185 """
181186 Creates a Redis-backed Big Segment store.
182187
@@ -198,8 +203,10 @@ def new_big_segment_store(url: str='redis://localhost:6379/0',
198203 ``DEFAULT_PREFIX``
199204 :param max_connections: the maximum number of Redis connections to keep in the
200205 connection pool; defaults to ``DEFAULT_MAX_CONNECTIONS``
206+ :param conn_options: extra options for initializing Redis connection from the url,
207+ see `redis.connection.ConnectionPool.from_url` for more details.
201208 """
202- return _RedisBigSegmentStore (url , prefix , max_connections )
209+ return _RedisBigSegmentStore (url , prefix , max_connections , ** conn_options )
203210
204211class Files :
205212 """Provides factory methods for integrations with filesystem data.
0 commit comments