如何在 RESTkit 0.2 中设置缓存策略 [英] How to set caching policy in RESTkit 0.2

查看:32
本文介绍了如何在 RESTkit 0.2 中设置缓存策略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不清楚如何使用 RESTKit 0.2 API 来设置缓存策略.我每次打开应用程序时都会重新运行一个请求,但我希望它被缓存.如何设置缓存策略以始终缓存请求?

I'm unclear how to use the RESTKit 0.2 API to set the caching policy. I have a request that is being rerun every time I open the app, but I would like it to be cached. How do I set the caching policy to always cache the request?

更新我了解到 RestKit 会自动缓存 Core Data 支持的映射.

Update I learned that RestKit will automatically cache Core Data backed Mappings.

推荐答案

缓存由 RKObjectRequestOperation 类.检查文档的缓存"部分.

Caching is controlled by the RKObjectRequestOperation class. Check the 'Caching' section of the documentation.

这篇关于如何在 RESTkit 0.2 中设置缓存策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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