Example #1
0
 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);
 }
Example #2
0
 public RequestCache(GraphQLServerSettings settings)
 {
     _cache = new DoubleBufferCache <string, RequestCacheItem>(settings.RequestCacheSize,
                                                               settings.RequestCacheEvictionTime.TotalSeconds);
     Enabled = settings.Options.IsSet(GraphQLServerOptions.EnableRequestCache);
 }