Skip to content

Commit

Permalink
Merge pull request #29 from Linq2GraphQL/schema-cache-key
Browse files Browse the repository at this point in the history
Changed Schema Cache key
  • Loading branch information
joadan committed Nov 9, 2023
2 parents b202a13 + e523bfe commit 68e91b7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Linq2GraphQL.Client/GraphClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ public class GraphClient
{
private readonly IMemoryCache cache;
private readonly IOptions<GraphClientOptions> options;
private Guid clientId = Guid.NewGuid();


public GraphClient(HttpClient httpClient, IOptions<GraphClientOptions> options, IServiceProvider provider)
{
this.options = options;
Expand Down Expand Up @@ -65,7 +64,7 @@ public async Task<GraphQLSchema> GetSchemaForSafeModeAsync()
return null;
}

var cackeKey = "Linq2GraphQL_Schema_" + clientId;
var cackeKey = "Linq2GraphQL_Schema:" + HttpClient.BaseAddress;

return await cache.GetOrCreateAsync(cackeKey, async entry =>
{
Expand Down

0 comments on commit 68e91b7

Please sign in to comment.