Merge pull request #4271 from ByteHamster/disable-cache
Do not cache feeds
This commit is contained in:
commit
50178771dd
|
@ -65,11 +65,12 @@ public class HttpDownloader extends Downloader {
|
||||||
final URI uri = URIUtil.getURIFromRequestUrl(request.getSource());
|
final URI uri = URIUtil.getURIFromRequestUrl(request.getSource());
|
||||||
Request.Builder httpReq = new Request.Builder().url(uri.toURL());
|
Request.Builder httpReq = new Request.Builder().url(uri.toURL());
|
||||||
httpReq.tag(request);
|
httpReq.tag(request);
|
||||||
|
httpReq.cacheControl(new CacheControl.Builder().noStore().build());
|
||||||
|
|
||||||
if (request.getFeedfileType() == FeedMedia.FEEDFILETYPE_FEEDMEDIA) {
|
if (request.getFeedfileType() == FeedMedia.FEEDFILETYPE_FEEDMEDIA) {
|
||||||
// set header explicitly so that okhttp doesn't do transparent gzip
|
// set header explicitly so that okhttp doesn't do transparent gzip
|
||||||
Log.d(TAG, "addHeader(\"Accept-Encoding\", \"identity\")");
|
Log.d(TAG, "addHeader(\"Accept-Encoding\", \"identity\")");
|
||||||
httpReq.addHeader("Accept-Encoding", "identity");
|
httpReq.addHeader("Accept-Encoding", "identity");
|
||||||
httpReq.cacheControl(new CacheControl.Builder().noStore().build());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!TextUtils.isEmpty(request.getLastModified())) {
|
if (!TextUtils.isEmpty(request.getLastModified())) {
|
||||||
|
|
Loading…
Reference in New Issue