kadirahq / subs-manager

Subscriptions Manager for Meteor
MIT License
358 stars 36 forks source link

How to clear all template-level subscriptions from 'onLogin' callback #54

Open madshargreave opened 9 years ago

madshargreave commented 9 years ago

Hi

I have a React component in which I make multiple subscriptions and cache them on the client. Problem is that if I log in to another user, the same subscription is still cached, resulting in the wrong data being shown.

I want to do something like SubsManager.clearAll, because I dont have access to the new SubsManager() reference in the callback.

Is this possible?

arunoda commented 9 years ago

Try to add a reference to it. We normally define subsmanager instances on the global namespace.