[cache] A couple of correctness tests using cache_check and cache_dump