File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/cn/trinea/android/common/service Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 66
77import android .content .Context ;
88import android .os .AsyncTask ;
9+ import cn .trinea .android .common .constant .HttpConstants ;
910import cn .trinea .android .common .dao .HttpCacheDao ;
1011import cn .trinea .android .common .dao .impl .HttpCacheDaoImpl ;
1112import cn .trinea .android .common .entity .HttpRequest ;
@@ -101,7 +102,10 @@ public HttpResponse httpGet(HttpRequest request) {
101102 return null ;
102103 }
103104
104- HttpResponse cacheResponse = getFromCache (url );
105+ HttpResponse cacheResponse = null ;
106+ if (!"no-cache" .equals (request .getRequestProperty (HttpConstants .CACHE_CONTROL ))) {
107+ cacheResponse = getFromCache (url );
108+ }
105109 return cacheResponse == null ? putIntoCache (HttpUtils .httpGet (url )) : cacheResponse ;
106110 }
107111
You can’t perform that action at this time.
0 commit comments