Local caching
To make entitlement checks fast and reliable, the Node.js SDK and the Sidecar cache a customer’s entitlements locally in memory. This avoids repeated network calls and ensures your application can continue evaluating entitlements even if the Stigg API is temporarily unreachable. The cache stays up to date through periodic polling or real-time updates.Other backend SDKs (Python, Ruby, Go, Java, .NET) don’t keep a local cache and call the Stigg API on every entitlement check. To get local caching in these languages, run the Sidecar alongside your application.
Persistent caching
For large distributed systems or serverless environments where processes restart frequently, Stigg supports a persistent external cache (e.g., Redis). Persistent caching keeps entitlements available across restarts, reduces cache misses, and ensures consistent entitlement data across all instances of your application. Stigg provides a dedicated persistent cache setup (supported in the Node SDK and Sidecar) that syncs entitlement and usage updates to your Redis cluster in near real time. This approach offers several advantages:- Entitlement data remains available even during API outages
- Lower latency and fewer direct API calls
- Reduced memory footprint in each service instance
- Higher cache hit rates and fewer coherence issues across fleets