Add debug mode in cache fetching