The Ruby Server SDK for Statsig is designed with an in-memory local cache to store configurations for gates and experiments. This cache enables the SDK to evaluate rules even in the event of Statsig service disruptions. The cache is updated by polling the Statsig server at a default interval of 10 seconds, which is configurable through the rulesets_sync_interval
initialization option.
The memory footprint of the cache is typically small, as it consists of a JSON string representing the configurations. However, developers should be cautious when using large ID lists for targeting, as this can significantly increase the size of the cached data and is generally not recommended.
It is important to note that the SDK does not cache user-specific assignments and parameters, but rather the configuration specifications. Monitoring application memory usage is always advisable to ensure efficient operation. For more detailed guidance on managing large ID lists and memory usage, refer to the official documentation.