问题描述
我正在使用RestKit进行webservice调用,缓存和etags。
我实现了我自己的coredata模型和managedObjects
I am using RestKit for webservice calls, caching, and etags.I implemented my own coredata model and managedObjects
一旦用户注销,我需要清除数据库中的所有数据。
我能够成功删除sqlite文件并重新创建它,但我找不到清除所有RestKit捕获和etag数据的方法。
如何彻底擦除RestKit存储的所有数据?
As soon as the user signs out I need to clear all data in the database.I was able to successfully delete the sqlite file and recreate it, but I can't find out a way to clear all RestKit catching and etag data.How can I completely wipe all data stored by RestKit?
推荐答案
你想打电话给 [[RKClient sharedClient] .requestCache invalidateAll];
擦除缓存清理。您可以查看。
You want to call [[RKClient sharedClient].requestCache invalidateAll];
to wipe the cache clean. You can view the API docs.
这篇关于iOS - RestKit并清除所有数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!