OPA Cache Questions #412
-
Hi there, The OPA http.send document, located at https://www.openpolicyagent.org/docs/latest/policy-reference/#http, mentions the Cache-Control, Expires headers, Max-Age directive, ETag, and 304 Not Modified status code. On the other hand, the OPA bundle document, located at https://www.openpolicyagent.org/docs/v0.11.0/bundles/#caching, only mentions ETag and 304 Not Modified, but doesn't say anything about the Cache-Control and Expires response headers. Do these two components use the same HTTP caching standard? Also, does the OPA bundle server set the other response headers and allow the caller to do client-side caching? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @Ronnie-personal 👋 No, the caching implementation for http.send is different from that of the bundle plugin. The bundle plugin respects caching directives but does not use max-age/expires AFAIK. Polling will always happen at the configured interval, but if the Etag matches and the server responds with a 304, no bundle will be downloaded as there are no changes to pull. |
Beta Was this translation helpful? Give feedback.
Hi @Ronnie-personal 👋
No, the caching implementation for http.send is different from that of the bundle plugin.
The bundle plugin respects caching directives but does not use max-age/expires AFAIK. Polling will always happen at the configured interval, but if the Etag matches and the server responds with a 304, no bundle will be downloaded as there are no changes to pull.