While this cache will not contain a huge amount of data in practice, it's nonetheless a *global* cache that currently will never be cleared. This patch also removes the existing closure, since it shouldn't really be necessary nowadays given that the code is a JavaScript module which means that only explicitly listed properties will be exported.