How to use MemoryCache insted of Timer to trigger a method?
问题 The following method handle concurrent request by waiting the result of an already running operation. Requests for data may come in simultaneously with same/different credentials. For each unique set of credentials there can be at most one GetCurrentInternal call in progress, with the result from that one call returned to all queued waiters when it is ready. private readonly ConcurrentDictionary<Credentials, Lazy<Data>> _dataToCredentialMap = new ConcurrentDictionary<Credentials, Lazy<Data>>(