mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-24 08:27:27 -04:00
Set new defaults for caches and stores
See https://github.com/opencloud-eu/opencloud/issues/2681 for more details.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ func DefaultConfig() *config.Config {
|
||||
Nodes: []string{"127.0.0.1:9233"},
|
||||
Database: "postprocessing",
|
||||
Table: "",
|
||||
TTL: 7 * 24 * time.Hour,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user