(store, key, callback)
| 4870 | } |
| 4871 | |
| 4872 | get(store, key, callback) { |
| 4873 | var cache = getCacheFor(this, store); |
| 4874 | var exists = cache.get(key); |
| 4875 | if (exists) { |
| 4876 | return nextTick(function () { |
| 4877 | callback(null, exists); |
| 4878 | }); |
| 4879 | } else if (exists === null) { // deleted marker |
| 4880 | /* istanbul ignore next */ |
| 4881 | return nextTick(function () { |
| 4882 | callback({name: 'NotFoundError'}); |
| 4883 | }); |
| 4884 | } |
| 4885 | store.get(key, function (err, res$$1) { |
| 4886 | if (err) { |
| 4887 | /* istanbul ignore else */ |
| 4888 | if (err.name === 'NotFoundError') { |
| 4889 | cache.set(key, null); |
| 4890 | } |
| 4891 | return callback(err); |
| 4892 | } |
| 4893 | cache.set(key, res$$1); |
| 4894 | callback(null, res$$1); |
| 4895 | }); |
| 4896 | } |
| 4897 | |
| 4898 | batch(batch) { |
| 4899 | for (var i = 0, len = batch.length; i < len; i++) { |
no test coverage detected