backstopmedia / hubbub

Sample project for the book Developing a Backbone.js Edge
http://backstopmedia.github.com/hubbub/
21 stars 111 forks source link

Cache where we can #15

Closed caseywebdev closed 11 years ago

caseywebdev commented 11 years ago

GitHub's API request rate limit is only 60 per hour. In light of this, I think we need to cache vigorously. Fortunately, all of the CRUD operations are set up for localStorage so we can save/fetch/destroy for free (basically), synchronously. I've set up the app so far to save repos and the repo's issues when they are added to app.board in the side panel view. This way, when we load up the page again all the data is pulled locally. I think we should make all GitHub API requests explicit opt-ins from UI interactions (i.e. "click to fetch new data"). If we start doing automatic remote fetches, however convenient it might be for certain parts of the app, we're going to hit that limit very quickly.

afeld commented 11 years ago

Done, right?

caseywebdev commented 11 years ago

Yup! Even though I just hit the rate limit lol