account-lookup-service 17.14.5-cache.2 → 17.14.5-cache.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "account-lookup-service",
3
3
  "description": "Account Lookup Service is used to validate Party and Participant lookups.",
4
- "version": "17.14.5-cache.2",
4
+ "version": "17.14.5-cache.3",
5
5
  "license": "Apache-2.0",
6
6
  "author": "ModusBox",
7
7
  "contributors": [
@@ -156,7 +156,7 @@ module.exports = {
156
156
  payload
157
157
  }, EventSdk.AuditEventAction.start)
158
158
 
159
- participants.postParticipants(request.headers, request.method, request.params, request.payload, request.span, request).catch(err => {
159
+ participants.postParticipants(request.headers, request.method, request.params, request.payload, request.span).catch(err => {
160
160
  request.server.log(['error'], `ERROR - postParticipants: ${LibUtil.getStackOrInspect(err)}`)
161
161
  })
162
162
  histTimerEnd({ success: true })
package/src/lib/cache.js CHANGED
@@ -41,16 +41,11 @@ class CacheClient {
41
41
  }
42
42
 
43
43
  async initCache (catboxMemoryClient) {
44
- if (catboxMemoryClient) {
45
- this.policy = new Catbox.Policy({
46
- generateFunc: this.generateFunc,
47
- expiresIn,
48
- generateTimeout: false
49
- },
50
- catboxMemoryClient,
51
- this.segment
52
- )
53
- }
44
+ this.policy = new Catbox.Policy({
45
+ generateFunc: this.generateFunc,
46
+ expiresIn,
47
+ generateTimeout: false
48
+ }, catboxMemoryClient, this.segment)
54
49
  return await this.preloadCache?.()
55
50
  }
56
51
 
@@ -89,7 +84,7 @@ const initCache = async function () {
89
84
  }
90
85
 
91
86
  const destroyCache = async function () {
92
- catboxMemoryClient?.stop()
87
+ await catboxMemoryClient?.stop()
93
88
  }
94
89
 
95
90
  const dropClients = function () {