Hello! Im using GraphQL 7.1.1 Memory Cache package and register it in DI like that:
.UseMemoryCache(options => { options.SizeLimit = 1_000_000; options.SlidingExpiration = null; })
My sample resolve is:
public class Query : ObjectGraphType<object>
{
public Query(IBusinessData data)
{
Name = "Query";
Field<ListGraphType<EmailType>, IEnumerable<Emails>>("emails")
.ResolveAsync(context => data.GetAutomappedValuesAsync<Emails>("Emails", "Emails", "", context.UserContext));
where GetAutomappedValuesAsync method is reading < 1MB data from web.
But every time i run query {emails {id}} GraphQL making web request instead of reading from cache.
Hello! Im using GraphQL 7.1.1 Memory Cache package and register it in DI like that:
.UseMemoryCache(options => { options.SizeLimit = 1_000_000; options.SlidingExpiration = null; })
My sample resolve is:
where
GetAutomappedValuesAsync
method is reading < 1MB data from web.But every time i run
query {emails {id}}
GraphQL making web request instead of reading from cache.What i have missed in configuring cache?