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:
@@ -9,11 +9,17 @@ var querystring = require('querystring');
|
||||
var request = require('request');
|
||||
var rp = require('request-promise');
|
||||
|
||||
var config = new Config('test');
|
||||
let database = config.database;
|
||||
var config;
|
||||
let database;
|
||||
var nobody = auth.nobody(config);
|
||||
|
||||
describe('rest query', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
config = new Config('test');
|
||||
database = config.database;
|
||||
});
|
||||
|
||||
it('basic query', (done) => {
|
||||
rest.create(config, nobody, 'TestObject', {}).then(() => {
|
||||
return rest.find(config, nobody, 'TestObject', {});
|
||||
|
||||
Reference in New Issue
Block a user