Setting metadata ejection
Bucket ejection from memory is set with POST /pools/default/buckets/default.
HTTP method and URI
To set the maximum of thread workers, use the evictionPolicy option. Default: valueOnly
POST /pools/default/buckets/default
Value-only ejection (the default) removes the data from cache but keeps all keys and metadata fields for non-resident items. When the value bucket ejection occurs, the item's value is reset. Full metadata ejection removes all data including keys, metadata, and key-values from cache for non-resident items. Full metadata ejection reduces RAM requirement for large buckets.
Important: When editing bucket properties, be sure to specify all bucket
properties. If a bucket property is not specified (whether or not you are changing the
existing value), Couchbase Server may reset the property to the default. Even if you do
not intend to change a certain property, re-specify the existing value to avoid this
behavior.
Syntax
Curl request syntax:
curl -u [admin]:[password] -X POST
http://[localhost]/pools/default/buckets/default
-d evictionPolicy=[valueOnly | fullEviction]
Example
Curl request example:
curl -u admin:password -X POST
http://10.5.2.54/pools/default/buckets/default
-d evictionPolicy=fullEviction
Response codes
"errors": {
"evictionPolicy": "Eviction policy must be either 'valueOnly' or 'fullEviction'"