Assert that the passed 'cache' is not NULL.  This should be turned
into asserts in the future.