mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 21:48:04 -05:00
Injimob 3186 - Added TTL to the cache (#1947)
* [INJIMOB-3186]:Added ttl to the cache Signed-off-by: sairam-g9162 <sairamgirirao@gmail.com> * [INJIMOB-3186]: Added TTL to cache Signed-off-by: sairam-g9162 <sairamgirirao@gmail.com> * [INJIMOB-3186]-Add TTL to cache Signed-off-by: sairam-g9162 <sairamgirirao@gmail.com> * INJIMOB-3186 Added TTL to cache with dynamic update from config Signed-off-by: Sairam Girirao <sairamgirirao@gmail.com> * [INJIMOB-3186]: Resolved review comments for card INJIMOB-3186 Signed-off-by: Sairam Girirao <sairamgirirao@gmail.com> --------- Signed-off-by: sairam-g9162 <sairamgirirao@gmail.com> Signed-off-by: Sairam Girirao <sairamgirirao@gmail.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import {KeyTypes} from './cryptoutil/KeyTypes';
|
||||
export let MIMOTO_BASE_URL = MIMOTO_HOST;
|
||||
export let ESIGNET_BASE_URL = ESIGNET_HOST;
|
||||
export let DEBUG_MODE_ENABLED = DEBUG_MODE === 'true';
|
||||
export let CACHE_TTL = 60 * 60 * 1000;
|
||||
|
||||
export const LIVENESS_CHECK = LIVENESS_DETECTION === 'true';
|
||||
export const LIVENESS_THRESHOLD = 0.4;
|
||||
@@ -20,6 +21,11 @@ export const changeCrendetialRegistry = (host: string) =>
|
||||
(MIMOTO_BASE_URL = host);
|
||||
export const changeEsignetUrl = (host: string) => (ESIGNET_BASE_URL = host);
|
||||
|
||||
export const updateCacheTTL = (ttl: number) => {
|
||||
console.info(`Updated CACHE_TTL as per config: ${ttl} ms`);
|
||||
CACHE_TTL = ttl;
|
||||
};
|
||||
|
||||
export const COMMON_PROPS_KEY: string =
|
||||
'CommonPropsKey-' + '6964d04a-9268-11ed-a1eb-0242ac120002';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user