Here is the description of what you'll need to implement on this technical challenge.
Implement a function, class or module (it can be on the same file - request.py
) to cache requests made with the existing code, preventing unecessary calls. You MUST use this Redis module as a cache service. Feel free to change the code within the existing functions, but do not alter their behaviour.
Context: Caching requests can be useful to avoid unecessary HTTP calls for the same resources, however, the resources can change during time, so it is important to keep in mind that cache needs to be invalidated at some point.