Exercise: HTTP Client Cache
Explore how to implement an HTTP client cache in Node.js by creating a proxy that caches responses from HTTP requests. Understand the caching mechanism with asynchronous methods, and learn to optimize repeated network calls by returning cached data. This lesson helps you apply the proxy pattern to enhance application efficiency.
We'll cover the following...
We'll cover the following...
Problem statement
Write a proxy for your favorite HTTP client library that caches the response of a given HTTP request, so that if you make the same request again, the response is immediately returned from the local cache, rather than being fetched from the remote URL.
Coding challenge
Write your solution code in the following code widget. We’ve already added the package.json ...