fixed is_cache_expired to handle the case when the cache file doesn exist