read_marketdata returns NULL when downloaded data is invalid.
In this situation the download data is cached and the parsed data, in this case NULL, is also cached.
Actually NULL is being cached in a rds file and the invalid downloaded file is also cached.
If read_marketdata returns NULL, the rds file can't be created and the given file, input file, should be removed either.
read_marketdata returns NULL when downloaded data is invalid. In this situation the download data is cached and the parsed data, in this case NULL, is also cached. Actually NULL is being cached in a rds file and the invalid downloaded file is also cached.
If read_marketdata returns NULL, the rds file can't be created and the given file, input file, should be removed either.
Simply, don't cache invalid or incorrect data.