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

Cache the history #35

Closed
lmerriam opened this issue Mar 29, 2016 · 8 comments
Closed

Cache the history #35

lmerriam opened this issue Mar 29, 2016 · 8 comments
Assignees

Comments

@lmerriam
Copy link
Collaborator

lmerriam commented Mar 29, 2016

Right now, if the user leaves the history to navigate to another section of the app, then returns to the history, they have to load the history again. If possible, it would be ideal to cache the currently visible history when the graph loads, so that the user can quickly switch between sections of the app.

@safeforge safeforge self-assigned this Jun 28, 2016
@lmerriam lmerriam modified the milestone: 1.3 Graph fixes Sep 5, 2016
@lmerriam lmerriam modified the milestones: 1.1, History improvements Dec 22, 2016
@lmerriam lmerriam changed the title Cache visible graph data so it doesn't have to reload entirely when switching pages within the app Cache the history Dec 22, 2016
@mpugach mpugach self-assigned this Jan 9, 2017
mpugach added a commit that referenced this issue Jan 26, 2017
mpugach added a commit that referenced this issue Jan 26, 2017
@mpugach
Copy link
Contributor

mpugach commented Jan 26, 2017

@lmerriam check on staging

currently it uses cache only if user has enough checkins to cover visible range

@lmerriam
Copy link
Collaborator Author

Thanks Max! It seems to be working well, could you clarify exactly what you meant here:

currently it uses cache only if user has enough checkins to cover visible range

@mpugach
Copy link
Contributor

mpugach commented Jan 27, 2017

If the earliest checkin date is greater than visible start date then API call is preformed again. Same on other edge

@mpugach
Copy link
Contributor

mpugach commented Jan 27, 2017

but the API calls are made with some room, so it tries to fetch more then visible

you can open the network tab in developer tools an play with it

the call look like this

flaredown 2017-01-27 06-21-55

@lmerriam
Copy link
Collaborator Author

Gotcha, sounds good.

One thing I should have been more explicit about:

As part of caching I was hoping we could save the user's position and visible trackables in the history. So that if I switch to the check-in, then switch back the the history, I'll return to the same position with the same visible charts and we won't have to reload any data (plus user gets the benefit of not losing their settings)

Is this feasible?

@mpugach
Copy link
Contributor

mpugach commented Jan 27, 2017

I think it is.

mpugach added a commit that referenced this issue Jan 27, 2017
mpugach added a commit that referenced this issue Jan 27, 2017
@mpugach
Copy link
Contributor

mpugach commented Jan 27, 2017

deployed to staging

@lmerriam
Copy link
Collaborator Author

Works fantastic for me!

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

3 participants