Cleanup cache exception-handling and an assert.