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