Harish Patil

Harish Patil

  • NA
  • 9
  • 599

Need to pass (list of request) instead of one request.

Feb 24 2017 12:02 PM
internal static void AddRequestToCache(Request req )
{
if (!isCacheInizialized)
renewRequestDictionaries();

if (req == null)
return;

requestCache.AddOrUpdate(req.RequestId, req, (key, oldValue) => req);
requestCacheUsage.AddOrUpdate(req.RequestId, DateTime.Now, (key, oldValue) => DateTime.Now);


//if (!usersCache.ContainsKey(theUser.UserId))
//{
// usersCache.TryAdd(theUser.UserId, theUser);
// usersCacheUsage.TryAdd(theUser.UserId, DateTime.Now);
//}

PurgeRequestCache();
}

Answers (1)