growthbook / growthbook-sdk-java

The Java SDK for GrowthBook (JVM, Android)
https://docs.growthbook.io/lib/java
MIT License
7 stars 10 forks source link

GB-23 GB-24 Networking with the GBFeaturesRepository #16

Closed tinahollygb closed 1 year ago

tinahollygb commented 1 year ago

Adds networking via the new GBFeaturesRepository class, allowing developers to fetch both unencrypted and encrypted features.

An instance of this class can be created with an endpoint URL, TTL (seconds), and optional encryption key for decrypting encrypted payloads.

Features

Issues

linear[bot] commented 1 year ago
GB-23 [Java SDK]: Implement feature repository that fetches and caches features in-memory

Initial `GBFeatureRepository` class. # Acceptance Criteria * ✅ should fetch features with provided endpoint and optional encryptionKey config. * ✅ expose method `getFeaturesJson()` * ✅ should send a user agent string to identify itself as the Java SDK with version

GB-24 [Java SDK]: Add caching with configurable TTL to the feature repository

The existing `GBFeatureRepository` class should be: * ✅ Configurable TTL for the caching * ✅ Have functionality to refresh the features when the cache has expired * ✅ Support a list of callbacks to allow implementations to listen for feature updates.