diff options
Diffstat (limited to 'DomainDig/LookupRuntime.swift')
| -rw-r--r-- | DomainDig/LookupRuntime.swift | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/DomainDig/LookupRuntime.swift b/DomainDig/LookupRuntime.swift index 08ea122..5db3134 100644 --- a/DomainDig/LookupRuntime.swift +++ b/DomainDig/LookupRuntime.swift @@ -79,15 +79,9 @@ actor LookupRuntime { } func availability(domain: String) async -> CachedLookupResult<DomainAvailabilityResult> { - await execute( - key: .domain(domain, .availability), - extract: { payload in - guard case let .availability(result) = payload else { return nil } - return result - }, - operation: { - .availability(await DomainAvailabilityService.check(domain: domain)) - } + CachedLookupResult( + value: await DomainAvailabilityService.check(domain: domain), + source: .live ) } |
