public GraphQLServer(object app, GraphQLServerSettings settings = null) { App = app; Settings = settings ?? new GraphQLServerSettings(); CoreModule = new CoreModule(); IntrospectionModule = new IntrospectionModule(); RegisterModules(this.CoreModule, this.IntrospectionModule); RequestCache = new RequestCache(this.Settings); }
public RequestCache(GraphQLServerSettings settings) { _cache = new DoubleBufferCache <string, RequestCacheItem>(settings.RequestCacheSize, settings.RequestCacheEvictionTime.TotalSeconds); Enabled = settings.Options.IsSet(GraphQLServerOptions.EnableRequestCache); }