Closed lyubomirr closed 4 years ago
Hi @lyubomirr
First question is on "GetAllAsync" method why do you check for keys which have no value and delete them. Is this possible to happen and why?
Yes, because Redis sets may contain dangling keys that we need to cleanup.
why do you check the TTL for the (subjectId) and (subjectId, clientId) cache and extend it only if it has less TTL but for set (subjectId, clientId, type) you always set the new expiration without checking? Is it because all the items inside have the same TTL and your last is always the one with most TTL?
it's because I need to expire the whole set entry in Redis if it's not renewed with another entry on StoreAsync
.
And lastly in method "StoreAsync" you check if (!string.IsNullOrEmpty(grant.SubjectId)) . Is it possible to have grants without subjectid?
yes, using client_credentials
grant will not yield a sub
in the access token.
Thank you very much for your answers!
you are welcome !
Hi, I have three questions regarding the persisted store which are not clear to me enough.
First question is on "GetAllAsync" method why do you check for keys which have no value and delete them. Is this possible to happen and why?
Second, why do you check the TTL for the (subjectId) and (subjectId, clientId) cache and extend it only if it has less TTL but for set (subjectId, clientId, type) you always set the new expiration without checking? Is it because all the items inside have the same TTL and your last is always the one with most TTL?
And lastly in method "StoreAsync" you check
if (!string.IsNullOrEmpty(grant.SubjectId))
. Is it possible to have grants without subjectid?Sorry, if questions are stupid but I just want to know what is really happening. Thanks in advance!