iOS - RestKit并清除所有数据? [英] iOS - RestKit and clearing all data?

查看:155
本文介绍了iOS - RestKit并清除所有数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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]; 擦除缓存清理。您可以查看 API文档

You want to call [[RKClient sharedClient].requestCache invalidateAll]; to wipe the cache clean. You can view the API docs.

这篇关于iOS - RestKit并清除所有数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆