Skip to content

RPC: http cache header module

What

Introduces the Http_cache_header module stub.

Why

Module where the middleware will be implemented.

By introducing a middleware arg, we are able to configure the middleware at the top level then pass it down to all concrete servers which will be useful when extending it to the external server process. In this MR, we perform this small surgery on the local server first so that we can test it later. When it is good, it will be extended to external rpc process.

Relative (head-n) queries are always changing which creates friction for integrating Octez RPCs with generic Caches as operators needs extra logic/heuristics to know when to invalidate such a response. To get around this, we introduce relevant HTTP Cache headers into the responses of Octez RPCs. The headers to be implemented are max-age and ETag with If-None-Modified. This is an ongoing work with multiple MRs.

6/n

5/n - !13335 (closed)

How

Manually testing the MR

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR

Merge request reports