pub fn get_fresh_for_writes(config: &CliConfig) -> Option<CachedOrgTicket>Expand description
Get a fresh org ticket for write operations
Write operations (put, find, ask) require up-to-date subscription status to prevent users from continuing to use the CLI after cancellation.
Smart refresh logic:
- If cached status is “active” → only refresh if older than 5 minutes
- If cached status is “canceled”/“inactive” → always refresh (instant unblock on reactivation)
This ensures:
- Active users get fast operations (minimal API calls)
- Canceled users can’t abuse the CLI (checked every operation)
- Reactivated users get instant access (no waiting for cache expiry)