volley cache return always null
In order to cache anything with
Volley you need to have two things:
1) server allows you to cache it. it usually appears in a
cache control tag in the HTTP header.
2) you save it or in this scenario you tell the
Volly to save.
so i think your problem is in number one. that means the server dose not allow you to cache those files, in order to confirm my answer you can do one of these things:
- download this plug in (RESTClient) for
mozillaand send your request and check the header file for cache control. if the server dose not allow you to cache you will see something like below image,notice cache control tag
- set break point in
headerValue = headers.get("Cache-Control");atHttpHeaderParseclass and see whats going on whenVolleywants to parse thecache control tag.
Comments
Post a Comment