fix the bug for cache