Async/Await Syntax
What design pattern does this code implement?
async function getData() {
const cache = await caches.open('my-cache');
const response = await cache.match('/api/data');
if (!response) {
const newResponse = await fetch('/api/data');
await cache.put('/api/data', newResponse.clone());
return newResponse;
}
return response;
}