solr-client-cache
solr-client using cacheman.
Caching module forInstallation
This module is distributed using npm which comes bundled with node:
npm install --save solr-client-cache
Usage
const solr = ;const solrCache = ; const client = solr; ; // search Solr with cacheclient ; // search Solr without cacheclient ;
If you want a different TTL (Time to Live) for a specific query, then pass it to the cache()
function.
const solr = ;const solrCache = ; const client = solr; ; // search Solr with cacheclient // 10 seconds TTL instead of 60s ;
All cache options (TTL, engine, etc...) are described on cacheman README.
Test
Just run:
npm test
License
MIT