growthbook-python icon indicating copy to clipboard operation
growthbook-python copied to clipboard

feat: Implement AbstractAsyncFeatureCache for async SDK clients

Open vazarkevych opened this issue 2 months ago • 0 comments

This PR introduces asynchronous feature caching support, which is critical for the asynchronous operation mode of the SDK (GrowthBookClient). Utilizing an async cache (e.g., Redis) significantly reduces latency and API load by eliminating the need for HTTP requests during a Cache HIT.

Changes

  • Added AbstractAsyncFeatureCache: Defined the interface for asynchronous caching, including methods like get(key), set(key, value, ttl).
  • Updated FeatureRepository: The load_features_async method now utilizes self.async_cache (if provided in Options) to check and store features in the cache.

vazarkevych avatar Dec 02 '25 13:12 vazarkevych