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

fix not remove cache minimongo when reconnected #233

Closed

Conversation

2ducanhpham
Copy link

No description provided.

@goyan
Copy link

goyan commented Jun 29, 2017

this seems required (batchUpdated undefined) with expo 18.0.0, ETA for merging?

@noris666
Copy link
Collaborator

@2ducanhpham please check your problems in package.json then we will try to test your code, better way if as yourself send for us mini report of test results. :-) good luck

@ujwal-setlur
Copy link
Contributor

any update on this PR? Seems necessary

@ujwal-setlur
Copy link
Contributor

ujwal-setlur commented Sep 18, 2017

This will not fix all the stale cache issues. Here is what I ran into:

  • I have a subscription for "orders"
  • I have an order in the orders collection.
  • When I navigate to another screen on the react-native app, the component is unmounted and subscription is stopped, but the order is still in the mini-mongo cache.
  • I disconnect from Meteor and remove the order from server.
  • I reconnect to Meteor. With this latest code, only active subscriptions get cleaned up for stale documents. However, my orders subscription is not active, so its stale document will not get cleaned out.
  • When I navigate to the orders page, the subscription is activated, but the stale order is still in the cache and shows up.

Also, since the collection on the server is empty, no "added" message comes from server to client, so there is no opportunity to add the collection to the hashmap.

The better solution is to just clear out all the collections on connect.

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.

4 participants