Regarding AddOidcStateDataFormatterCache service, #210
Replies: 1 comment
-
When using There is no way to change this behavior other than rolling your own implementation of
The Distributed SQL Server cache implementation is provided by Microsoft, so we can't really comment nor provide support on that. A quick search however reveals that the cache service cleans up expired data whenever a cache request is being made. See the usage of ScanForExpiredItemsIfRequired for more information. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm looking to reduce the size of the state parameter when sending requests to an external Identity Provider. To achieve this, I'm working on integrating AddOidcStateDataFormatterCache in IdentityServer.
Since I want to avoid using in-memory or distributed memory cache, I'm configuring AddDistributedSqlServerCache instead. Below is the configuration I’ve added in the Startup class:
Questions:
I'm unsure how to configure SlidingExpiration when using AddOidcStateDataFormatterCache. Could you please guide me on how to explicitly apply SlidingExpiration to the entries stored in the SQL cache?
So far, I’ve only added the configuration shown above, and it seems that the caching behavior is being handled automatically. I haven’t made any customizations related to expiration settings.
I understand this setting defines how often expired items are scanned and removed. Could you clarify:
Beta Was this translation helpful? Give feedback.
All reactions