Navigation Menu

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

feat(core): add snapshot cache #246

Merged
merged 3 commits into from Nov 25, 2019

Conversation

illuminist
Copy link
Contributor

@illuminist illuminist commented Nov 12, 2019

Description

Add snapshot cache

 Get DocumentSnapshot and QuerySnapshot with object from either data or
 ordered firestore state. If provided with doc data, it will return
 DocumentSnapshot, providing with a collection from data or an array from
 ordered state will return QuerySnapshot, except ordered state that generated
 as DocumentRef will return DocumentSnapshot
 Note: the cache is local and, not persistance. Passing an object from initial
 state or from SSR state will yield undefined.

Check List

If not relevant to pull request, check off as complete

  • All tests passing
  • Docs updated with any changes or examples if applicable
  • Added tests to ensure new feature(s) work properly

Relevant Issues

#203

@prescottprue
Copy link
Owner

Love this idea - let me know if I can be of any help!

@illuminist illuminist changed the title [wip] Add snapshot cache Add snapshot cache Nov 13, 2019
@prescottprue
Copy link
Owner

prescottprue commented Nov 23, 2019

Were you imagining this going into current or a v1.0.0 version? Seems like it could go into a new minor version since it doesn't seem to break anything or prevent backwards compatibility.

Looking forward to getting it in, thanks for the PR!

@prescottprue prescottprue changed the title Add snapshot cache feat(core): add snapshot cache Nov 23, 2019
@illuminist
Copy link
Contributor Author

It's still okay to add this to the current version as it isn't contain any breaking change though. Even though I myself don't have usage for this yet but it would be better to have people to try it out.

@prescottprue prescottprue changed the base branch from master to v0.11.0 November 25, 2019 15:36
@prescottprue prescottprue merged commit acab96d into prescottprue:v0.11.0 Nov 25, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants