PrivateconstructorPrivate constructor for singleton pattern.
Private_Cache timeout duration in milliseconds (default: 1 hour)
Private_Array of cached environment DTOs
Private_Flag indicating whether a fetch operation is in progress
Private_Timestamp of last successful fetch in milliseconds
Private Static_Singleton instance of EnvironmentCache
Clears the environment cache.
PrivatefetchFetches environments from the API.
Datalayer SDK instance
Gets cached environments or fetches them if cache is stale.
Datalayer SDK instance
Authentication provider to check if user is logged in
Force refresh even if cache is valid
Array of available environments
Gets current cache status.
Cache status information
Whether the cache is currently valid
Number of cached environments
Whether a fetch operation is in progress
Date of last fetch, or null if never fetched
Refreshes environment cache when user logs in. Should be called when authentication state changes to authenticated.
Datalayer SDK instance
Clears environment cache when user logs out. Should be called when authentication state changes to unauthenticated.
Sets custom cache timeout.
Timeout in milliseconds
PrivatewaitWaits for ongoing fetch to complete.
Staticget
Caches Datalayer environments for efficient runtime creation. Singleton pattern ensures single cache instance across extension.