think-model
Advanced tools
Comparing version 1.4.1 to 1.4.2
@@ -113,2 +113,8 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } | ||
} | ||
// user should set key timeout in here | ||
// so we should sperate it to avoid it covers cacheConfig.timeout | ||
config._keyTimeout = config.timeout; | ||
delete config.timeout; | ||
const cacheConfig = this._cacheConfig; | ||
@@ -115,0 +121,0 @@ if (cacheConfig) { |
{ | ||
"name": "think-model", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "An adapter-based ORM for ThinkJS 3.x", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -91,6 +91,6 @@ const {test} = require('ava'); | ||
model.cache(500); | ||
t.is(model.options.cache.timeout, 500); | ||
t.is(model.options.cache._keyTimeout, 500); | ||
model.cache('page', {timeout: 300}); | ||
t.is(model.options.cache.key, 'page'); | ||
t.is(model.options.cache.timeout, 300); | ||
t.is(model.options.cache._keyTimeout, 300); | ||
model.cache('page', {key: 'post'}); | ||
@@ -97,0 +97,0 @@ t.is(model.options.cache.key, 'post'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
115840
26
3937
1