MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / constructor

Method constructor

static/compiler-service.ts:52–63  ·  view source on GitHub ↗
(eventHub: EventEmitter)

Source from the content-addressed store, hash-verified

50 private cache: LRUCache<string, CompilationResult>;
51
52 constructor(eventHub: EventEmitter) {
53 this.allowStoreCodeDebug = true;
54 this.cache = new LRUCache({
55 maxSize: 200 * 1024,
56 sizeCalculation: n => JSON.stringify(n).length,
57 });
58
59 eventHub.on(
60 'settingsChange',
61 (newSettings: SiteSettings) => (this.allowStoreCodeDebug = newSettings.allowStoreCodeDebug),
62 );
63 }
64
65 private async getDefaultCompilerForLang(langId: string): Promise<string> {
66 const languages = await languagesService.getLanguages();

Callers

nothing calls this directly

Calls 1

onMethod · 0.45

Tested by

no test coverage detected