account-lookup-service 17.14.0-snapshot.1 → 17.14.0-snapshot.4
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/config/default.json
CHANGED
@@ -52,14 +52,14 @@
|
|
52
52
|
"getDecoratedValue": true
|
53
53
|
},
|
54
54
|
"CENTRAL_SHARED_PARTICIPANT_CACHE_CONFIG": {
|
55
|
-
"expiresIn":
|
55
|
+
"expiresIn": 3000,
|
56
56
|
"generateTimeout": 30000,
|
57
57
|
"getDecoratedValue": true
|
58
58
|
},
|
59
59
|
"GENERAL_CACHE_CONFIG": {
|
60
60
|
"CACHE_ENABLED": false,
|
61
61
|
"MAX_BYTE_SIZE": 10000000,
|
62
|
-
"EXPIRES_IN_MS":
|
62
|
+
"EXPIRES_IN_MS": 3000
|
63
63
|
},
|
64
64
|
"PROXY_CACHE": {
|
65
65
|
"enabled": true,
|
@@ -51,14 +51,14 @@
|
|
51
51
|
"getDecoratedValue": true
|
52
52
|
},
|
53
53
|
"CENTRAL_SHARED_PARTICIPANT_CACHE_CONFIG": {
|
54
|
-
"expiresIn":
|
54
|
+
"expiresIn": 3000,
|
55
55
|
"generateTimeout": 30000,
|
56
56
|
"getDecoratedValue": true
|
57
57
|
},
|
58
58
|
"GENERAL_CACHE_CONFIG": {
|
59
59
|
"CACHE_ENABLED": false,
|
60
60
|
"MAX_BYTE_SIZE": 10000000,
|
61
|
-
"EXPIRES_IN_MS":
|
61
|
+
"EXPIRES_IN_MS": 3000
|
62
62
|
},
|
63
63
|
"PROXY_CACHE": {
|
64
64
|
"enabled": true,
|
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.0-snapshot.
|
4
|
+
"version": "17.14.0-snapshot.4",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"author": "ModusBox",
|
7
7
|
"contributors": [
|
@@ -93,7 +93,7 @@
|
|
93
93
|
"@hapi/vision": "7.0.3",
|
94
94
|
"@mojaloop/central-services-error-handling": "13.1.2",
|
95
95
|
"@mojaloop/central-services-health": "15.1.0",
|
96
|
-
"@mojaloop/central-services-logger": "11.10.
|
96
|
+
"@mojaloop/central-services-logger": "11.10.1",
|
97
97
|
"@mojaloop/central-services-metrics": "12.7.1",
|
98
98
|
"@mojaloop/central-services-shared": "18.33.3",
|
99
99
|
"@mojaloop/central-services-stream": "11.8.7",
|
@@ -141,6 +141,7 @@ const sendOracleGetRequest = async ({
|
|
141
141
|
const log = logger.child({ component: 'sendOracleGetRequest', params })
|
142
142
|
|
143
143
|
try {
|
144
|
+
let hit = false // cache hit
|
144
145
|
let cachedOracleFspResponse
|
145
146
|
cachedOracleFspResponse = cache && cache.get(cache.createKey(`oracleSendRequest_${url}`))
|
146
147
|
|
@@ -161,12 +162,12 @@ const sendOracleGetRequest = async ({
|
|
161
162
|
cache.createKey(`oracleSendRequest_${url}`),
|
162
163
|
cachedOracleFspResponse
|
163
164
|
)
|
164
|
-
histTimerEnd({ success: true, hit: false })
|
165
165
|
} else {
|
166
|
+
hit = true
|
166
167
|
cachedOracleFspResponse = cachedOracleFspResponse.item
|
167
|
-
histTimerEnd({ success: true, hit: true })
|
168
|
-
logger.debug('[oracleRequest]: cache hit for fsp for partyId lookup')
|
169
168
|
}
|
169
|
+
logger.verbose(`[oracleRequest]: cache hit for partyId lookup: ${hit}`, { url, source, destination })
|
170
|
+
histTimerEnd({ success: true, hit })
|
170
171
|
|
171
172
|
return cachedOracleFspResponse
|
172
173
|
} catch (err) {
|