Repository navigation
Conversation
This should solve the complaint of speed problems in #162.
|
Hi @fluggo ! Would you please rename the __cachedUpns to cacheUpns? This would help us keep a consistent variable naming. I'd like to discuss which strategy would be better regarding this cache. Is it better that we add an expiration or not? If we go with the expiration strategy, which value would be good? As @the21st commented in #162, #162 (comment), 30 seconds is too low. You were thinking about 24 hours. But what happens if the authentication information of the user changes in the meantime? My point is that I think we shouldn't use any expiration strategy. If the credentials change, the application would need to be restarted. As you said, this information would rarely change. If it really does, the probability of this change timing coincides with the expiration timing is very low and either the user would need to this timeout to reach or the application would need to be take down anyway. I think that if we remove the expiration and taking down the application to reflect any authentication changes becomes an annoyance, I think we could create a method to clear this cache. I'm saying all that because I think that any low value of this timeout would bring delays to the most used scenario. I hope I'm not being too much confusing... What do you think? |
|
Yeah, I was trying to think of the poor sap who is running a long-lived service or something and doesn't know why a particular user can't log in, and I thought it would be nice if the application righted itself after awhile. I doubt many people would think to call a ClearUpnCache method. It's your library, though! Also, sorry about the __cachedUpns. I saw single-underscore names in that class, and I tend to name static variables with double underscores. If you want to go with no timeout and a static ClearUpnCache() method, let me know. |
Yeah, I agree with you. I also don't like the idea of having this ClearUpnCache method. I'll try to think about another alternative. If you have any idea, please, let me know. Thank you for all your help and support on this issue, Brian! |
This should solve the complaint of speed problems in #162.