REST requests without any headers do not expire in JDG.
Environment
- Red Hat JBoss Data Grid (JDG)
- 7.x
Issue
- Default expiration defined in JDG server does not work when entries are added through
REST RESTrequests does not expire if headers are not provided.
Resolution
- For now headers (
maxidletimesecondsandtimetoliveseconds) are required to be sent inRESTrequest to avoid this issue as below :
curl -H "authorization: Basic XXX" -H "maxidletimeseconds: 0" -H "timetoliveseconds: 0" -H "content-type: text/plain;charset=ISO-8859-1" -X PUT --data "BAR" "http://127.0.0.1:8080/rest/testCache/FOO"
- This is a bug in JDG and JIRA JDG-1768 is raised.
Root Cause
-
The attributes
timeToLiveSecondsandmaxIdleTimeSecondsheaders are assigned the value0, then cache uses the default values configured either using XML or programatically. -
Refer REST Interface Operation Headers for more information.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
