このコンテンツは選択した言語では利用できません。
9.6.2. Retrieving Data Using REST
In Red Hat JBoss Data Grid's REST Interface, use the following methods to retrieve data from the cache:
- HTTP
GET
method. - HTTP
HEAD
method.
9.6.2.1. About GET /{cacheName}/{cacheKey}
The
GET
method returns the data located in the supplied cacheName
, matched to the relevant key, as the body of the response. The Content-Type header provides the type of the data. A browser can directly access the cache.
A unique entity tag (ETag) is returned for each entry along with a Last-Modified header which indicates the state of the data at the requested URL. ETags allow browsers (and other clients) to ask for data only in the case where it has changed (to save on bandwidth). ETag is a part of the HTTP standard and is supported by Red Hat JBoss Data Grid.
The type of content stored is the type returned. As an example, if a String was stored, a String is returned. An object which was stored in a serialized form must be manually deserialized.