diff --git a/libraries/deno-commons-mod.ts b/libraries/deno-commons-mod.ts index d1ee383..934f11f 100644 --- a/libraries/deno-commons-mod.ts +++ b/libraries/deno-commons-mod.ts @@ -1633,6 +1633,8 @@ export interface GetSecretValueOptions { runEnv?: SecretValueRunEnv; localCache?: boolean; tryRefresh?: boolean; + defaultCacheTimeSecs?: number; + maxCacheTimeSecs?: number; } export function getRunEnv(): stirng | null { @@ -1675,9 +1677,9 @@ export async function getSecretValue( return await __getSecretValue(key, options); }, { - tryRefresh: options.tryRefresh, - defaultCacheTimeSecs: 3600, - maxCacheTimeSecs: 3600 * 24, + tryRefresh: options?.tryRefresh, + defaultCacheTimeSecs: options?.defaultCacheTimeSecs ?? 3600, + maxCacheTimeSecs: options?.maxCacheTimeSecs ?? 3600 * 24, }, ); }