Science, engineering, coding and music geek for vocation and profit.
My main areas of interest include machine learning, automation, smart home/IoT, IT security, infrastructure design and devops.
Great pattern, but it's good to point out that it only works within the same "run" of the application/page. Your cache will be emptied by a page reload. I commonly use a similar pattern, but relying on the browser storage instead of a closure object.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great pattern, but it's good to point out that it only works within the same "run" of the application/page. Your cache will be emptied by a page reload. I commonly use a similar pattern, but relying on the browser storage instead of a closure object.