java.lang.Object | |
↳ | org.apache.http.client.cache.HttpCacheEntry |
Structure used to store an HttpResponse in a cache. Some entries
can optionally depend on system resources that may require explicit
deallocation. In such a case getResource()
should return a non
null instance of Resource
that must be deallocated by calling
dispose()
method when no longer used.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new
HttpCacheEntry with variants. | |||||||||||
Create a new
HttpCacheEntry . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns all the headers that were on the origin response.
| |||||||||||
Returns the first header from the origin response with the given
name.
| |||||||||||
Gets all the headers with the given name that were on the origin
response.
| |||||||||||
Returns the
ProtocolVersion from the origin HttpResponse. | |||||||||||
Gets the reason phrase from the origin HttpResponse, for example,
"Not Modified".
| |||||||||||
Returns the time the associated origin request was initiated by the
caching module.
| |||||||||||
Returns the
Resource containing the origin response body. | |||||||||||
Returns the time the origin response was received by the caching module.
| |||||||||||
Returns the HTTP response code from the origin HttpResponse.
| |||||||||||
Returns the
StatusLine from the origin HttpResponse. | |||||||||||
Returns an index about where in the cache different variants for
a given resource are stored.
| |||||||||||
Indicates whether the origin response indicated the associated
resource had variants (i.e.
| |||||||||||
Provides a string representation of this instance suitable for
human consumption.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Create a new HttpCacheEntry
with variants.
requestDate | Date/time when the request was made (Used for age calculations) |
---|---|
responseDate | Date/time that the response came back (Used for age calculations) |
statusLine | HTTP status line from origin response |
responseHeaders | Header[] from original HTTP Response |
resource | representing origin response body |
variantMap | describing cache entries that are variants of this parent entry; this maps a "variant key" (derived from the varying request headers) to a "cache key" (where in the cache storage the particular variant is located) |
Create a new HttpCacheEntry
.
requestDate | Date/time when the request was made (Used for age calculations) |
---|---|
responseDate | Date/time that the response came back (Used for age calculations) |
statusLine | HTTP status line from origin response |
responseHeaders | Header[] from original HTTP Response |
resource | representing origin response body |
Returns the first header from the origin response with the given name.
Gets all the headers with the given name that were on the origin response.
Returns the ProtocolVersion
from the origin HttpResponse.
Gets the reason phrase from the origin HttpResponse, for example, "Not Modified".
Returns the time the associated origin request was initiated by the caching module.
Returns the time the origin response was received by the caching module.
Returns the HTTP response code from the origin HttpResponse.
Returns an index about where in the cache different variants for
a given resource are stored. This maps "variant keys" to "cache keys",
where the variant key is derived from the varying request headers,
and the cache key is the location in the
HttpCacheStorage
where that
particular variant is stored. The first variant returned is used as
the "parent" entry to hold this index of the other variants.
Indicates whether the origin response indicated the associated resource had variants (i.e. that the Vary header was set on the origin response).
true
if this cached response was a variant
Provides a string representation of this instance suitable for human consumption.