Update cache and register APIs

This is the beginning of integrating the cache and register APIs. The largest change is a breaking one: register no longer accepts a function, instead it accepts an object. The function has been moved to the object's `update` property.

...this may change again. Sorry in advance, and thanks for bearing with me.