Implement two request handling methods, loading data from various sources cached for 500ms.
-
Look at the test in src/index.test.js. The test is designed to validate the caching behavior of the two functions
requestAandB
andrequestBandC
. Make sure you understand how the test works and what the two functions are supposed to return in different points in time. -
Clone the repo and run
npm install
-
Add code in src/index.js completing the two functions
requestAandB
andrequestBandC
so that:- running the test with
npm test
passes successfuly loadDataA
,loadDataB
andloadDataC
are being cached for 500ms (used only once in 500ms)
- running the test with