6.4 Mapping rules of caching
This clause specifies how to enable or disable CoAP caching mechanism and how to use cached information.
If the CoAP end point supports caching mechanism by freshness, the CoAP server shall:
- set the Max-Age Option value to "0" (zero) to disable caching, in order to support complete oneM2M mapping; or
- set the Max-Age option value to another value (such as the default value), in order to use CoAP caching mechanism for constrained environment.
Note
1: In the second case, the new request from oneM2M layer can get the stored fresh response from CoAP client, not from CoAP server.
If the CoAP end point supports caching mechanism by validity:
- the CoAP server shall not present Etag in responses to disable caching, in order to support complete oneM2M mapping; or
- the CoAP server shall present Etag in responses, in order to use CoAP caching mechanism for constrained environment.
Note
2: In the second case, the new request from oneM2M layer can get the stored fresh response from CoAP server, not from oneM2M layer.