calculateApiKeyHelperTtl function

int calculateApiKeyHelperTtl()

Calculate TTL in milliseconds for the API key helper cache.

Implementation

int calculateApiKeyHelperTtl() {
  final envTtl = Platform.environment['MAGE_API_KEY_HELPER_TTL_MS'];
  if (envTtl != null) {
    final parsed = int.tryParse(envTtl);
    if (parsed != null && parsed >= 0) {
      return parsed;
    }
  }
  return defaultApiKeyHelperTtl;
}