Small check prompted by issue #233. Skips caching in cases where the result is length 0.
Not an exhaustive fix (e.g. if someone is staging August code and runs statcast("2021-08-01","2021-08-31") on August 25, they'll still have a non-zero dataframe but be missing a few days). Could consider something more sophisticated using datetime in the future, but this at least provides a little protection.
Small check prompted by issue #233. Skips caching in cases where the result is length 0.
Not an exhaustive fix (e.g. if someone is staging August code and runs
statcast("2021-08-01","2021-08-31")
on August 25, they'll still have a non-zero dataframe but be missing a few days). Could consider something more sophisticated using datetime in the future, but this at least provides a little protection.