Do not cache feeds

This speeds up feed refresh but it is confusing to users if new episodes do not appear instantly.
This commit is contained in:
ByteHamster 2020-07-01 10:17:04 +02:00
parent 0e05a8af7b
commit e52517722d
1 changed files with 2 additions and 1 deletions

View File

@ -65,11 +65,12 @@ public class HttpDownloader extends Downloader {
final URI uri = URIUtil.getURIFromRequestUrl(request.getSource());
Request.Builder httpReq = new Request.Builder().url(uri.toURL());
httpReq.tag(request);
httpReq.cacheControl(new CacheControl.Builder().noStore().build());
if (request.getFeedfileType() == FeedMedia.FEEDFILETYPE_FEEDMEDIA) {
// set header explicitly so that okhttp doesn't do transparent gzip
Log.d(TAG, "addHeader(\"Accept-Encoding\", \"identity\")");
httpReq.addHeader("Accept-Encoding", "identity");
httpReq.cacheControl(new CacheControl.Builder().noStore().build());
}
if (!TextUtils.isEmpty(request.getLastModified())) {