From 0c0189155ade65f97f7801764d2cd9a16be4c0b0 Mon Sep 17 00:00:00 2001 From: Levi Schoen Date: Fri, 27 Oct 2023 12:34:27 -0700 Subject: [PATCH] add back lost code from git rebase / merge resolution --- config/config.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/config.go b/config/config.go index 386e70b..385eccd 100644 --- a/config/config.go +++ b/config/config.go @@ -106,6 +106,7 @@ const ( CACHE_ENABLED_ENVIRONMENT_KEY = "CACHE_ENABLED" REDIS_ENDPOINT_URL_ENVIRONMENT_KEY = "REDIS_ENDPOINT_URL" REDIS_PASSWORD_ENVIRONMENT_KEY = "REDIS_PASSWORD" + CACHE_INDEFINITELY_KEY = "CACHE_INDEFINITELY" CACHE_TTL_ENVIRONMENT_KEY = "CACHE_TTL_SECONDS" CACHE_PREFIX_ENVIRONMENT_KEY = "CACHE_PREFIX" ) @@ -249,6 +250,7 @@ func ReadConfig() Config { RedisEndpointURL: os.Getenv(REDIS_ENDPOINT_URL_ENVIRONMENT_KEY), RedisPassword: os.Getenv(REDIS_PASSWORD_ENVIRONMENT_KEY), CacheTTL: time.Duration(EnvOrDefaultInt(CACHE_TTL_ENVIRONMENT_KEY, 0)) * time.Second, + CacheIndefinitely: EnvOrDefaultBool(CACHE_INDEFINITELY_KEY, false), CachePrefix: os.Getenv(CACHE_PREFIX_ENVIRONMENT_KEY), } }