@@ -144,7 +144,8 @@ 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
@@ -167,16 +168,19 @@ def new_feature_store(url: str='redis://localhost:6379/0',
167168 connection pool; defaults to ``DEFAULT_MAX_CONNECTIONS``
168169 :param caching: specifies whether local caching should be enabled and if so,
169170 sets the cache properties; defaults to :func:`ldclient.feature_store.CacheConfig.default()`
171+ :param conn_options: extra options for initializing Redis connection from the url,
172+ see `redis.connection.ConnectionPool.from_url` for more details.
170173 """
171- core = _RedisFeatureStoreCore (url , prefix , max_connections )
174+ core = _RedisFeatureStoreCore (url , prefix , max_connections = max_connections , ** conn_options )
172175 wrapper = CachingStoreWrapper (core , caching )
173176 wrapper ._core = core # exposed for testing
174177 return wrapper
175178
176179 @staticmethod
177180 def new_big_segment_store (url : str = 'redis://localhost:6379/0' ,
178181 prefix : str = 'launchdarkly' ,
179- max_connections : int = 16 ) -> BigSegmentStore :
182+ max_connections : int = 16 ,
183+ ** conn_options : Any ) -> BigSegmentStore :
180184 """
181185 Creates a Redis-backed Big Segment store.
182186
@@ -198,8 +202,10 @@ def new_big_segment_store(url: str='redis://localhost:6379/0',
198202 ``DEFAULT_PREFIX``
199203 :param max_connections: the maximum number of Redis connections to keep in the
200204 connection pool; defaults to ``DEFAULT_MAX_CONNECTIONS``
205+ :param conn_options: extra options for initializing Redis connection from the url,
206+ see `redis.connection.ConnectionPool.from_url` for more details.
201207 """
202- return _RedisBigSegmentStore (url , prefix , max_connections )
208+ return _RedisBigSegmentStore (url , prefix , max_connections = max_connections , ** conn_options )
203209
204210class Files :
205211 """Provides factory methods for integrations with filesystem data.
0 commit comments