feat(cache): Add a JS interface to CacheRegister

I think this fails in dart2js mode (wrap it in a JsFunction to get it to pass).  :(