AFNetworking : How to know if response is using cache or not ? 304 or 200

前端 未结 4 1235
栀梦
栀梦 2020-12-05 07:56

I can\'t find any answer to my question, may be I miss something...

When I ask for a url, I need to know if the response comes from the cache or from the net.

<
4条回答
  •  不知归路
    2020-12-05 08:28

    seems that apple doesn't want you to know if it comes from cache or not.

    I found a way by saving modification-date associate with the request, and I compare this date when AFNetWorking answers to me.

    not as clean as I intend, but works...

提交回复
热议问题