Fix some tests for Cache class