Skip to content

Commit

Permalink
Fix argument names
Browse files Browse the repository at this point in the history
  • Loading branch information
volkanceylan committed Oct 20, 2024
1 parent 82df9a1 commit b9245b5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public virtual IUserDefinition ByUsername(string username)
protected abstract string GetCacheGroupKey();

protected virtual string GetIdCacheKey(string id) => "UserByID_" + id;
protected virtual string GetUsernameCacheKey(string id) => "UserByName_" + id.ToLowerInvariant();
protected virtual string GetUsernameCacheKey(string username) => "UserByName_" + username.ToLowerInvariant();

protected virtual IUserDefinition GetCachedById(string id)
{
Expand Down Expand Up @@ -53,9 +53,9 @@ public virtual void RemoveAll()
public virtual void RemoveCachedUser(string userId, string username)
{
if (IsValidUserId(userId))
cache.Remove("UserByID_" + userId);
cache.Remove(GetIdCacheKey(userId));

if (IsValidUsername(username))
cache.Remove("UserByName_" + username.ToLowerInvariant());
cache.Remove(GetUsernameCacheKey(username));
}
}

0 comments on commit b9245b5

Please sign in to comment.