I love this library—it's made analyzing GA data so much easier for me.
There is a bug with how caching works. Currently, the result of a query is cached, regardless of the return status. The issue is that the next time the query runs (with cache = TRUE), you'll relive the error code, even if the error came from rate limiting. What's more, because of how RGoogleAnalytics builds up the cache file name, it's not obvious how to quickly delete just the right file. This means that if you've built up a solid cache of responses over time for historical reports, you either need to spend time discovering the filename or need to delete the entire cache.
I could see a couple of better solutions here:
Don't cache responses with error codes
Add a 'delete cache' function for particular query params
Use a library like memoise to make cache management easier
I love this library—it's made analyzing GA data so much easier for me.
There is a bug with how caching works. Currently, the result of a query is cached, regardless of the return status. The issue is that the next time the query runs (with
cache = TRUE
), you'll relive the error code, even if the error came from rate limiting. What's more, because of howRGoogleAnalytics
builds up the cache file name, it's not obvious how to quickly delete just the right file. This means that if you've built up a solid cache of responses over time for historical reports, you either need to spend time discovering the filename or need to delete the entire cache.I could see a couple of better solutions here:
memoise
to make cache management easierWhat do you think?