feat(cache): Add a JS interface to CacheRegister

Closes #1181