Kikobeats/cacheable-response

Parameter to provide backend in KeyV

piyushchauhan2011 opened this issue · 1 comments

I was wondering since, the underlying caching mechanism usage keyv and KeyV has support for the different backend for caching, can we provide some parameter to control that from cacheable-response ?

cache = new Keyv({ namespace: 'ssr' }),

can be modified to have support for backend

new Keyv('redis://user:pass@localhost:6379', { namespace: 'cache' });

Just pass your custom cache instance:

{
  cache: new Keyv('redis://user:pass@localhost:6379', { namespace: 'cache' });
}

The default declaration is more a fallback to be used on dev mode.