Log session cache size

This commit is contained in:
dotasek 2024-05-30 14:48:03 -04:00
parent 22ccbbfdfb
commit a2cf7897f0
1 changed files with 4 additions and 4 deletions

View File

@ -491,7 +491,7 @@ public class ValidationService {
}
ValidationEngine validationEngine;
if (hasBaseEngineForKey(cliContext.getBaseEngine())) {
System.out.println("Getting base engine: " + cliContext.getBaseEngine());
System.out.println("Building new validator engine from base engine: " + cliContext.getBaseEngine());
validationEngine = new ValidationEngine(getBaseEngine(cliContext.getBaseEngine()));
/* As a service, it wouldn't be efficient to have a base validation engine
* for every language. So we just use the baseEngine and set the language
@ -500,17 +500,17 @@ public class ValidationService {
validationEngine.setLanguage(cliContext.getLang());
validationEngine.setLocale(cliContext.getLocale());
} else {
System.out.println("Building new validator engine.");
System.out.println("Building new validator engine from CliContext");
if (cliContext.getSv() == null) {
String sv = determineVersion(cliContext);
cliContext.setSv(sv);
}
validationEngine = buildValidationEngine(cliContext, definitions, tt);
}
sessionId = sessionCache.cacheSession(validationEngine);
System.out.println("Cached new session. Cache size = " + sessionCache.getSessionIds().size());
} else {
System.out.println("Cached session exists for session id " + sessionId + ", returning stored validator session id.");
System.out.println("Cached session exists for session id " + sessionId + ", returning stored validator session id. Cache size = " + sessionCache.getSessionIds().size());
}
return sessionId;
}