Skip to content

Commit 68e91b7

Browse files
authored
Merge pull request #29 from Linq2GraphQL/schema-cache-key
Changed Schema Cache key
2 parents b202a13 + e523bfe commit 68e91b7

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/Linq2GraphQL.Client/GraphClient.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ public class GraphClient
1111
{
1212
private readonly IMemoryCache cache;
1313
private readonly IOptions<GraphClientOptions> options;
14-
private Guid clientId = Guid.NewGuid();
15-
14+
1615
public GraphClient(HttpClient httpClient, IOptions<GraphClientOptions> options, IServiceProvider provider)
1716
{
1817
this.options = options;
@@ -65,7 +64,7 @@ public async Task<GraphQLSchema> GetSchemaForSafeModeAsync()
6564
return null;
6665
}
6766

68-
var cackeKey = "Linq2GraphQL_Schema_" + clientId;
67+
var cackeKey = "Linq2GraphQL_Schema:" + HttpClient.BaseAddress;
6968

7069
return await cache.GetOrCreateAsync(cackeKey, async entry =>
7170
{

0 commit comments

Comments
 (0)