diff --git a/pkg/roles/manager.go b/pkg/roles/manager.go index eb85d23bbc..c191262ea2 100644 --- a/pkg/roles/manager.go +++ b/pkg/roles/manager.go @@ -15,7 +15,7 @@ import ( const ( cacheDatabase = "opencloud-pkg" cacheTableName = "roles" - cacheTTL = time.Hour + cacheTTL = 24 * time.Hour ) // Manager manages a cache of roles by fetching unknown roles from the settings.RoleService. diff --git a/services/eventhistory/pkg/config/defaults/defaultconfig.go b/services/eventhistory/pkg/config/defaults/defaultconfig.go index ee085414d8..d61f57934d 100644 --- a/services/eventhistory/pkg/config/defaults/defaultconfig.go +++ b/services/eventhistory/pkg/config/defaults/defaultconfig.go @@ -1,8 +1,6 @@ package defaults import ( - "time" - "github.com/opencloud-eu/opencloud/pkg/structs" "github.com/opencloud-eu/opencloud/services/eventhistory/pkg/config" ) @@ -37,7 +35,7 @@ func DefaultConfig() *config.Config { Nodes: []string{"127.0.0.1:9233"}, Database: "eventhistory", Table: "", - TTL: 336 * time.Hour, + TTL: 0, }, GRPC: config.GRPCConfig{ Addr: "127.0.0.1:9274", diff --git a/services/graph/pkg/config/defaults/defaultconfig.go b/services/graph/pkg/config/defaults/defaultconfig.go index 9b5352f6ea..8f18e58a75 100644 --- a/services/graph/pkg/config/defaults/defaultconfig.go +++ b/services/graph/pkg/config/defaults/defaultconfig.go @@ -114,7 +114,7 @@ func DefaultConfig() *config.Config { Store: "memory", Nodes: []string{"127.0.0.1:9233"}, Database: "cache-roles", - TTL: time.Hour * 336, + TTL: time.Hour * 24, }, Events: config.Events{ Endpoint: "127.0.0.1:9233", diff --git a/services/ocs/pkg/config/defaults/defaultconfig.go b/services/ocs/pkg/config/defaults/defaultconfig.go index 59872940c8..e39f83a31c 100644 --- a/services/ocs/pkg/config/defaults/defaultconfig.go +++ b/services/ocs/pkg/config/defaults/defaultconfig.go @@ -42,7 +42,7 @@ func DefaultConfig() *config.Config { SigningKeys: &config.SigningKeys{ Store: "nats-js-kv", // signing keys are read by proxy, so we cannot use memory. It is not shared. Nodes: []string{"127.0.0.1:9233"}, - TTL: time.Hour * 12, + TTL: time.Hour * 24, }, } } diff --git a/services/postprocessing/pkg/config/defaults/defaultconfig.go b/services/postprocessing/pkg/config/defaults/defaultconfig.go index 39186aaa1f..2e2e45f60f 100644 --- a/services/postprocessing/pkg/config/defaults/defaultconfig.go +++ b/services/postprocessing/pkg/config/defaults/defaultconfig.go @@ -42,6 +42,7 @@ func DefaultConfig() *config.Config { Nodes: []string{"127.0.0.1:9233"}, Database: "postprocessing", Table: "", + TTL: 7 * 24 * time.Hour, }, } } diff --git a/services/storage-system/pkg/config/defaults/defaultconfig.go b/services/storage-system/pkg/config/defaults/defaultconfig.go index 9608cd4662..52b13ac05c 100644 --- a/services/storage-system/pkg/config/defaults/defaultconfig.go +++ b/services/storage-system/pkg/config/defaults/defaultconfig.go @@ -54,7 +54,7 @@ func DefaultConfig() *config.Config { Store: "memory", Nodes: []string{"127.0.0.1:9233"}, Database: "storage-system", - TTL: 24 * 60 * time.Second, + TTL: 24 * time.Hour, }, } } diff --git a/services/storage-users/pkg/config/defaults/defaultconfig.go b/services/storage-users/pkg/config/defaults/defaultconfig.go index cf015f275e..216f28eb3e 100644 --- a/services/storage-users/pkg/config/defaults/defaultconfig.go +++ b/services/storage-users/pkg/config/defaults/defaultconfig.go @@ -166,7 +166,7 @@ func DefaultConfig() *config.Config { Store: "memory", Nodes: []string{"127.0.0.1:9233"}, Database: "storage-users", - TTL: 24 * 60 * time.Second, + TTL: 24 * time.Hour, }, IDCache: config.IDCache{ Store: "nats-js-kv",