[NETCONF-1207] Correct RESTCONF cache control metadata Created: 06/Dec/23  Updated: 06/Dec/23  Resolved: 06/Dec/23

Status: Resolved
Project: netconf
Component/s: restconf-nb
Affects Version/s: None
Fix Version/s: 7.0.0

Type: Improvement Priority: Medium
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: Rewire restconf-nb

 Description   

We are not emitting Cache-Control field when responding producing a response, but we are required to do so.

Furthermore we are faking ETag header based on schema, which is entirely incorrect, as it does not reflect the content of the datastore.

We are also producing Last-Modified header indicating the resource was modified at the time the request has completed in a format not compatible with HTTP.

Finally, we are producing these headers only for GET request on /data, but not in POST or PUT.

Correct this by:

  1. always emitting Cache-Control: no-cache
  2. delegating the responsibility for ETag/Last-Modified to a particular RestconfStrategy

As part of this change we will not generate these headers, but define the APIs so that individual strategies can provide them, subject to subsequent improvements.


Generated at Wed Feb 07 20:16:55 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.