Fix a bug which can not handle the case in which cache is not configured