Add helper function file_exists_in_cache()