Adds schema caching capabilities (5s by default) (#2286)
* Adds schema caching capabilities (off by default) * Use InMemoryCacheAdapter * Uses proper adapter to generate a cache * Fix bugs when running disabled cache * nits * nits * Use options object instead of boolean * Imrpove concurrency of loadSchema * Adds testing with SCHEMA_CACHE_ON * Use CacheController instead of generator - Makes caching SchemaCache use a generated prefix - Makes clearing the SchemaCache clear only the cached schema keys - Enable cache by default (ttl 5s)
This commit is contained in:
@@ -116,6 +116,11 @@ var masterKeyHeaders = {
|
||||
};
|
||||
|
||||
describe('schemas', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
config.database.schemaCache.clear();
|
||||
});
|
||||
|
||||
it('requires the master key to get all schemas', (done) => {
|
||||
request.get({
|
||||
url: 'http://localhost:8378/1/schemas',
|
||||
|
||||
Reference in New Issue
Block a user