Adrian Brand
1 min readDec 28, 2018

--

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}`));

--

--

No responses yet