diff options
Diffstat (limited to 'src/main/java/com/android/volley/Cache.java')
-rw-r--r-- | src/main/java/com/android/volley/Cache.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/main/java/com/android/volley/Cache.java b/src/main/java/com/android/volley/Cache.java index 8482c22..fd7eea1 100644 --- a/src/main/java/com/android/volley/Cache.java +++ b/src/main/java/com/android/volley/Cache.java @@ -17,6 +17,7 @@ package com.android.volley; import java.util.Collections; +import java.util.List; import java.util.Map; /** @@ -83,9 +84,22 @@ public interface Cache { /** Soft TTL for this record. */ public long softTtl; - /** Immutable response headers as received from server; must be non-null. */ + /** + * Response headers as received from server; must be non-null. Should not be mutated + * directly. + * + * <p>Note that if the server returns two headers with the same (case-insensitive) name, + * this map will only contain the one of them. {@link #allResponseHeaders} may contain all + * headers if the {@link Cache} implementation supports it. + */ public Map<String, String> responseHeaders = Collections.emptyMap(); + /** + * All response headers. May be null depending on the {@link Cache} implementation. Should + * not be mutated directly. + */ + public List<Header> allResponseHeaders; + /** True if the entry is expired. */ public boolean isExpired() { return this.ttl < System.currentTimeMillis(); |