Add option to re-use schema cache between requests (#2979)
* Add option to reuse database controller between requests. Clear schema cache when deleting everything * Add test * Rename setting to persistSchemaCache to more accurately reflect effect * Repurpose option to determine whether to randomize cache prefix. Restore Config.js controller creation. Add tests * Fix bug with missing parameter passed to to SchemaCache * Renaming and formatting * Fix property name typo * Rename option to avoid double negative and still be falsey by default. Style fix
This commit is contained in:
committed by
Florent Vilmart
parent
801308d9b7
commit
b347bff641
@@ -37,11 +37,12 @@ export class Config {
|
||||
|
||||
// Create a new DatabaseController per request
|
||||
if (cacheInfo.databaseController) {
|
||||
const schemaCache = new SchemaCache(cacheInfo.cacheController, cacheInfo.schemaCacheTTL);
|
||||
const schemaCache = new SchemaCache(cacheInfo.cacheController, cacheInfo.schemaCacheTTL, cacheInfo.enableSingleSchemaCache);
|
||||
this.database = new DatabaseController(cacheInfo.databaseController.adapter, schemaCache);
|
||||
}
|
||||
|
||||
this.schemaCacheTTL = cacheInfo.schemaCacheTTL;
|
||||
this.enableSingleSchemaCache = cacheInfo.enableSingleSchemaCache;
|
||||
|
||||
this.serverURL = cacheInfo.serverURL;
|
||||
this.publicServerURL = removeTrailingSlash(cacheInfo.publicServerURL);
|
||||
|
||||
Reference in New Issue
Block a user