How to set cache resource expire time in seconds form terminal or postman?

Not applicable

I able to create a Cache resource from terminal or postman using CURL

In expire settings I can only set cache expire for Date 'expireDate' only, but not for Time of Day and Timeout in Seconds. How can I set expire in seconds and day of time.

{ "compression":

{ "minimumSizeInKB": 100 },

"description": "testCache",

"diskSizeInMB": 2000,

"distributed": true,

"expirySettings": {

"expiryDate": { "value": "01-01-2017" },

"valuesNull": false },

"inMemorySizeInKB": 0,

"maxElementsInMemory": 0,

"maxElementsOnDisk": 0,

"name": "testRaja1",

"overflowToDisk": false,

"persistent": true }

and In UI expire date is not showing properly, It showing undefined NaN, 0NaN for this kindly find the screenshot

3126-testcachecreate1.png

And

Kindly explain about below parameters

inMemorySizeInKB, maxElementsInMemory, maxElementsOnDisk

0 2 1,077
2 REPLIES 2

Not applicable

Request URL to create Cache :

https://api.enterprise.apigee.com/v1/organizations/{org-name}/environments/{env}/caches?name={cache-...

Request header

content-type: application/json

Request Body

{ "compression": { "minimumSizeInKB": "100" }, "description": "testCache", "diskSizeInMB": "2000", "expirySettings": { "expiryDate": { "value": "01-01-2017" }, "valuesNull": "true" }, "persistent" : "true" }

Not applicable

We can also set expire time of day and time in seconds as per below

Set expire time in seconds

"expirySettings": { "timeoutInSec": { "value": "3000" }, "valuesNull": false }

Set Expire time of Day

"expirySettings": { "timeOfDay": { "value": "07:20:21" }, "valuesNull": false }