Closed fvlima closed 9 months ago
Shouldn't the cache be invalidated when adding a new ResponseType (or changing existing)?
Shouldn't the cache be invalidated when adding a new ResponseType (or changing existing)?
@suutari-ai It depends if adding new response types is something that happens with certain frequency. But what I realized is that the response types are fixed (we only associate existing response types for clients that we create), and if new response types will be add, I think that will be generated new migration for that, so, in this situation, a new deploy of the project that uses this lib must be done, and in this scenario, the cache will be reloaded. The tests simulate the cache invalidating, but it was made just for the tests
@juanifioren Hey, are there plans to get this merged for the next release? The performance improvement seems nice
Thanks for the contribution and discussion. We know have on develop OIDC_DISCOVERY_CACHE_ENABLE setting to control this behaviour. Will be available on next version. CC @fvlima @kelkarajay
@davidbeermann ^
Cache response types in ProviderInfoView to avoid database query for each request.
Testing with ab:
After
Before
Approximately ~ 20ms response time performance improvement on average among 100 requests