load method
Implementation
@override
Future<SeoDomFirstRuntimeArtifact> load(
SeoDomFirstApplicationRuntime reference,
) async {
if (!isValidSeoApplicationRuntimeId(reference.id)) {
throw StateError('Invalid application runtime id "${reference.id}".');
}
final cached = _cache[reference];
if (cached != null) return cached;
final pending = _load(reference);
_cache[reference] = pending;
try {
return await pending;
} catch (_) {
if (identical(_cache[reference], pending)) _cache.remove(reference);
rethrow;
}
}