Fixed minor bug in cache test.