Provides functionality to handle portal details, including caching and server requests.
Methods
-
static get(guid)
-
Retrieves portal details from cache by GUID.
Parameters:
Name Type Description guid
string The Global Unique Identifier of the portal.
Returns:
-Cached portal details if available.
-
static isFresh(guid) → {boolean}
-
Checks if portal details are fresh in the cache.
Parameters:
Name Type Description guid
string The Global Unique Identifier of the portal.
Returns:
boolean -True if details are fresh, false otherwise.
-
static request(guid) → {Promise}
-
Requests detailed information for a specific portal. If the information is not already being requested, it initiates a new request. Returns a promise that resolves with the portal details.
Parameters:
Name Type Description guid
string The Global Unique Identifier of the portal.
Returns:
Promise -A promise that resolves with the portal details upon successful retrieval or rejection on failure.
-
static setup()
-
Sets up the portal detail handler, initializing the cache.
-
static store(guid, dict, freshtime)
-
Stores portal details in the cache.
Parameters:
Name Type Description guid
string The Global Unique Identifier of the portal.
dict
object The portal detail data.
freshtime
number Optional freshness time for cache.
Returns:
-Result of cache storage operation.