fix more cache api bugs