We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af7e39d commit de6e653Copy full SHA for de6e653
packages/cubejs-server-core/src/core/CompilerApi.js
@@ -35,6 +35,20 @@ export class CompilerApi {
35
ttl: options.maxCompilerCacheKeepAlive,
36
updateAgeOnGet: options.updateCompilerCacheKeepAlive
37
});
38
+
39
+ // proactively free up old cache values occasionally
40
+ if (this.options.maxCompilerCacheKeepAlive) {
41
+ this.compiledScriptCacheInterval = setInterval(
42
+ () => this.compiledScriptCache.purgeStale(),
43
+ this.options.maxCompilerCacheKeepAlive
44
+ );
45
+ }
46
47
48
+ dispose() {
49
+ if (this.compiledScriptCacheInterval) {
50
+ clearInterval(this.compiledScriptCacheInterval);
51
52
}
53
54
setGraphQLSchema(schema) {
0 commit comments