Set new defaults for caches and stores

See https://github.com/opencloud-eu/opencloud/issues/2681 for more
details.
This commit is contained in:
André Duffeck
2026-04-30 11:00:12 +02:00
parent ae92dd031d
commit 544968a4de
7 changed files with 7 additions and 8 deletions

View File

@@ -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.

View File

@@ -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",

View File

@@ -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",

View File

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

View File

@@ -42,6 +42,7 @@ func DefaultConfig() *config.Config {
Nodes: []string{"127.0.0.1:9233"},
Database: "postprocessing",
Table: "",
TTL: 7 * 24 * time.Hour,
},
}
}

View File

@@ -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 * 60 * 60 * time.Second,
},
}
}

View File

@@ -165,7 +165,7 @@ func DefaultConfig() *config.Config {
Store: "memory",
Nodes: []string{"127.0.0.1:9233"},
Database: "storage-users",
TTL: 24 * 60 * time.Second,
TTL: 24 * 60 * 60 * time.Second,
},
IDCache: config.IDCache{
Store: "nats-js-kv",