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:
Sairam Girirao
2025-06-18 12:22:02 +05:30
committed by GitHub
parent f6bd61c3b4
commit 720e7d907b
4 changed files with 81 additions and 20 deletions

View File

@@ -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';