Validation
Validate a license, read entitlements, and fall back to a cache when offline.
After activation, call validate() to confirm the license is still good. It's
cheap (cached locally) and safe to call on every startup.
Validate
How often to validate
| Strategy | Use when |
|---|---|
| On startup only | Long-running servers; lowest overhead |
| Every N minutes | Balance freshness vs. calls |
| Per request | Strict enforcement (rely on the local cache to stay fast) |
Entitlements
To read limits and current usage without a full validation, call
entitlements():
Offline / cache fallback
The SDK caches the last successful validation. If the portal is unreachable, it falls back to that cached response so a brief outage doesn't lock customers out.
Choose maxAgeSeconds deliberately. Longer windows are friendlier during
outages but widen the gap before a revoked license stops working offline.