You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use Cloudflare in front of poets to cache some endpoints like /info, /proofs, /pow_params etc. Currently, cache retention is configured on the CF side, but it would be best if the poet notified CF for how long it can cache responses. This is possible in HTTP with the Cache-Control HTTP header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control.
motivation
We use Cloudflare in front of poets to cache some endpoints like /info, /proofs, /pow_params etc. Currently, cache retention is configured on the CF side, but it would be best if the poet notified CF for how long it can cache responses. This is possible in HTTP with the
Cache-Control
HTTP header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control.It is possible to inject HTTP headers in responses in a GRPC-gateway (GRPC-HTTP proxy that we use) with https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/customizing_your_gateway/#mutate-response-messages-or-set-response-headers
endpoints
/info
It contains dynamic content (open and executing round IDs) that changes every round (epoch). It could advertise
max-age
till the end of round/pow_params
It serves 2 values:
challenge
- it currently changes after a round is finished (it's the root of the last proof),difficulty
- set in configuration, it can change after poet service was restarted./proofs
The content is static and never changes - can be cached indefinitely.
/submit
Should never be cached.
The text was updated successfully, but these errors were encountered: