DBCDK / dbc-node-serviceprovider

Node module that provides access to the DBC webservices through a series of client modules
1 stars 1 forks source link

It should be possible to configure cache for each webservice individually #1

Closed hrmoller closed 9 years ago

hrmoller commented 9 years ago

Currently cache is configured for all webserivce-client at once. Having one global default cache configuration is fine but along with the configuration parameters for each webservice it should be possible to define cache settings for that specific webservice.

I.e.:

opensearch: {
    wsdl: 'http://ml-p01.dbc.dk/opensearch/tags/3.2/opensearch.wsdl',
    agency: '150013',
    profile: 'opac',
    cache: {
      enabled: true,
      ttl: 3600, // seconds
      etc ...
      }
  },

This will require some refactoring in registerServiceClient(config, client) (found in ServiceClients.js).

guddo commented 9 years ago

Did you make any pros/cons-thoughts whether this should be defined within the service-providers config, or in the actual client?

hrmoller commented 9 years ago

First of I thought about defining it in the ServiceProviders config, simply because it will fulfill our current needs and because it's the solution that requires the smallest amount of work.

guddo commented 9 years ago

I think thats a good idea for now. If needed, we can re-open this issue later.

hrmoller commented 9 years ago

Fixed with https://github.com/DBCDK/dbc-node-serviceprovider/commit/7937e4ce97522e8ab5ea9a1882c75e83dca8bc53