PUT
Creates the specified resource or updates a resource representation.
Allowed Resource Updates
Updating a resource representation means editing the value of one of the following boolean cache attributes:
Enabled – Enable (true, DEFAULT) or disable (false) the cache.
StatisticsEnabled – Enable (true, DEFAULT) or disable (false) statistics gathering for the cache. Disabling statistics can improve a cache's performance, but limits monitoring capabilities. Note that if statistics are disabled, then sampled statistics are automatically disabled.
SampledStatiscsEnabled – Enable (true, DEFAULT) or disable (false) sampled statistics. Sampled statistics are used for providing averages and other aggregate values. If sampled statistics are enabled, statistics gathering is automatically enabled.
Updating a Cache Attribute
The following URI can update the cache attributes as specified in the content.
/agents;ids=MyConnectionGroup_MyEhcache/cacheManagers;names=foo/caches;names=baz
For example, to turn off statistics gathering for the cache "baz", you would use the following content:
{"attributes":{"StatisticsEnabled":false}}
Possible HTTP Status Codes for PUT
201 – The operation was successful.
204 – The cache was successfully updated.
400 – The URI does not specify a single resource.
409 – The resource with the given name already exists.