don't cache unfound accounts

This commit is contained in:
Nicolas Constant
2021-01-27 03:27:04 -05:00
parent d0a3b3beab
commit 66bbf3129f

View File

@@ -33,7 +33,7 @@ namespace BirdsiteLive.Twitter
if (!_userCache.TryGetValue(username, out TwitterUser user))
{
user = _twitterService.GetUser(username);
_userCache.Set(username, user, _cacheEntryOptions);
if(user != null) _userCache.Set(username, user, _cacheEntryOptions);
}
return user;