don't cache unfound accounts

This commit is contained in:
Nicolas Constant 2021-01-27 03:27:04 -05:00
parent d0a3b3beab
commit 66bbf3129f
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 1 additions and 1 deletions

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;