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), } }