Refactoring a bit to allow JNI cleanCache call