Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in caching design #44

Open
davejacobs opened this issue Dec 15, 2017 · 0 comments
Open

Bug in caching design #44

davejacobs opened this issue Dec 15, 2017 · 0 comments

Comments

@davejacobs
Copy link

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:

  1. Don't cache responses with error codes
  2. Add a 'delete cache' function for particular query params
  3. Use a library like memoise to make cache management easier

What do you think?

@davejacobs davejacobs changed the title Caching bug Bug in caching design Dec 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant