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

How to purge all items in the DataProvide and empty the cache in one shot? #62

Open
rahimizad opened this issue Feb 5, 2017 · 1 comment

Comments

@rahimizad
Copy link

rahimizad commented Feb 5, 2017

When a user logs out, we need to purge but it doesn't seem that you guys support a complete purge...

Is this the only way?

// Purge let count = self?.usersDataProvider.count ?? 0 for index in stride(from: count, to: 0, by: -1) { self?.usersDataProvider.remove(at: index) }

@plivesey
Copy link
Owner

In the LinkedIn app, when the user logs out we tear down all the view controllers. Since the data providers are owned by the view controller, they automatically get purged.

The easiest way to purge is to just create a new data provider.

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

2 participants