Skip to content

Commit cf9eaa0

Browse files
committed
modify HttpCache
1 parent 0fa9161 commit cf9eaa0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/cn/trinea/android/common/service/HttpCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public void clear() {
209209
*
210210
* @author <a href="http://www.trinea.cn" target="_blank">Trinea</a> 2013-11-15
211211
*/
212-
public abstract class HttpCacheListener {
212+
public static abstract class HttpCacheListener {
213213

214214
/**
215215
* Runs on the UI thread before httpGet.<br/>

src/cn/trinea/android/common/util/HttpUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,5 +417,6 @@ private static void setHttpResponse(HttpURLConnection urlConnection, HttpRespons
417417
}
418418
response.setResponseHeader(HttpConstants.EXPIRES, urlConnection.getHeaderField("Expires"));
419419
response.setResponseHeader(HttpConstants.CACHE_CONTROL, urlConnection.getHeaderField("Cache-Control"));
420+
response.setExpiredTime(response.getExpiresInMillis());
420421
}
421422
}

0 commit comments

Comments
 (0)