Skip to content

Commit

Permalink
Actually use the access token hash for #1, ref fc22b27
Browse files Browse the repository at this point in the history
  • Loading branch information
Archomeda committed Jun 13, 2019
1 parent f417ad0 commit 1bbdbac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Gw2Sharp/WebApi/V2/Clients/BaseEndpointClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ protected async Task<CacheItem<TEndpointObject>> GetOrUpdateAsync<TEndpointObjec
if (this.IsAuthenticated)
{
// Prepend the cache id with a hash of the access token to make sure that different access tokens will get separately cached
cacheId = $"{cacheId.ToString().GetSha1Hash()}_{cacheId}";
cacheId = $"{this.Connection.AccessToken.GetSha1Hash()}_{cacheId}";
}

var result = await this.Connection.CacheMethod.GetOrUpdateAsync(this.EndpointPath, cacheId, async () =>
Expand Down

0 comments on commit 1bbdbac

Please sign in to comment.