Skip to content

Conversation

@dutow
Copy link
Collaborator

@dutow dutow commented Nov 20, 2025

This commit implements a basic cache using the dshash infrasturcture in PostgreSQL: we simply cache the HTTP results based on the Cache-Control property sent by the server.

The cache itself is relatively simple, most of the impelementation is a should-be-safe C++ wrapper around dshash, and infrastructure to handle pg_try properly everywhere.

No proper tests added yet, as Keycloak decided to don't allow caching for issuer and jwks requests at all, so the cache is not used in our rspec tests. We likely have to add a more complex setup there with an nginx proxy in between.

This commit implements a basic cache using the dshash infrasturcture in
PostgreSQL: we simply cache the HTTP results based on the Cache-Control
property sent by the server.

The cache itself is relatively simple, most of the impelementation is a
should-be-safe C++ wrapper around dshash, and infrastructure to handle
pg_try properly everywhere.

No proper tests added yet, as Keycloak decided to don't allow caching
for issuer and jwks requests at all, so the cache is not used in our
rspec tests. We likely have to add a more complex setup there with an
nginx proxy in between.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant