Skip to content

Commit

Permalink
proposal for hadcoding cache and secret parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
koala7659 committed Aug 15, 2024
1 parent d952984 commit b251e12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package applications
import (
"context"
"fmt"
"os"
"strings"
"time"

Expand Down Expand Up @@ -84,10 +83,7 @@ type ServiceRepository interface {

// NewServiceRepository creates a new ApplicationServiceRepository
func NewServiceRepository(appManager Manager) ServiceRepository {
cacheRetention, err := time.ParseDuration(os.Getenv("ACM_GATEWAY_APPCACHE_RETENTION"))
if err != nil || cacheRetention <= 0 {
cacheRetention = 5 * time.Minute
}
cacheRetention := 5 * time.Minute
zap.L().Info("Configuring application cache to store application data for %.2fm", zap.Float64("cacheRetention", cacheRetention.Minutes()))
return &repository{
appManager: appManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package secrets
import (
"context"
"fmt"
"os"
"time"

"go.uber.org/zap"
Expand Down Expand Up @@ -38,10 +37,7 @@ type Manager interface {

// NewRepository creates a new secrets repository
func NewRepository(secretsManager Manager) Repository {
cacheRetention, err := time.ParseDuration(os.Getenv("ACM_GATEWAY_SECRETCACHE_RETENTION"))
if err != nil || cacheRetention <= 0 {
cacheRetention = 5 * time.Minute
}
cacheRetention := 5 * time.Minute
zap.L().Info("Configuring application cache to store application data for %.2fm", zap.Float64("cacheRetention", cacheRetention.Minutes()))
return &repository{
secretsManager: secretsManager,
Expand Down

0 comments on commit b251e12

Please sign in to comment.