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.

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

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
Adrian Brand

Adrian Brand

More from Medium

3 Habits to Stay Healthy in a Hectic World

Types of Fun

letting go.

[Learn] MySQL Grouping — Many to Many Relationship (3)