solr-client-cache
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -23,2 +23,5 @@ 'use strict'; | ||
if (cachedResults) { | ||
// set debug flag | ||
Object.defineProperty(cachedResults, '__fromCache', { value: true }); | ||
callback(null, cachedResults); | ||
@@ -25,0 +28,0 @@ return cachedResults; |
{ | ||
"name": "solr-client-cache", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Caching for Solr Client", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -154,2 +154,15 @@ 'use strict'; | ||
it('should flag the results as "from cache"', (done) => { | ||
solrClient.cache().search({}, (err) => { | ||
should.not.exist(err); | ||
solrClient.cache().search({}, (err, results) => { | ||
should.not.exist(err); | ||
results.should.have.property('__fromCache'); | ||
results.__fromCache.should.be.true(); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
@@ -156,0 +169,0 @@ |
14353
261