When you call the load function you can pass in a new constructor function. So you don’t add the constructor function with parameters when you initialise the cache item but when you call load, take a look at the user service and you will see load is called with a new constructor function.

this.userCache.load(() => this.http.get<User>(`user/${id}`));

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store