Related Documentation : Cache Server User Guide : Using the RESTful Services : Resource Representations
Resource Representations
We deal with resource representations rather than resources themselves.
Element Resource Representations
When Elements are PUT into the cache, a MIME Type should be set in the request header. The MIME Type is preserved for later use. The new MimeTypeByteArray is used to store the byte[] and the MimeType in the value field of Element. Some common MIME Types which are expected to be used by clients are:
text/plain
Plain text
text/xml
Extensible Markup Language. Defined in RFC 3023
application/json
JavaScript Object Notation JSON. Defined in RFC 4627
application/x-java-serialized-object
A serialized Java object
Because Ehcache is a distributed Java cache, in some configurations the Cache server may contain Java objects that arrived at the Cache server via distributed replication. In this case no MIME Type will be set and the Element will be examined to determine its MIME Type. Because anything that can be PUT into the cache server must be Serializable, it can also be distributed in a cache cluster i.e. it will be Serializable.
Copyright © 2010-2015 Software AG, Darmstadt, Germany.

Product Logo |   Feedback