node: Fix initialization of frostfsid cache #1594
2 changed files with 3 additions and 2 deletions
|
@ -43,7 +43,7 @@ func initContainerService(_ context.Context, c *cfg) {
|
|||
fatalOnErr(err)
|
||||
|
||||
cacheSize := morphconfig.FrostfsIDCacheSize(c.appCfg)
|
||||
if cacheSize > 0 {
|
||||
if cacheSize > 0 && c.cfgMorph.cacheTTL > 0 {
|
||||
frostfsIDSubjectProvider = newMorphFrostfsIDCache(frostfsIDSubjectProvider, int(cacheSize), c.cfgMorph.cacheTTL, metrics.NewCacheMetrics("frostfs_id"))
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,8 @@ contracts: # side chain NEOFS contract script hashes; optional, override values
|
|||
|
||||
morph:
|
||||
dial_timeout: 30s # timeout for side chain NEO RPC client connection
|
||||
cache_ttl: 15s # Sidechain cache TTL value (min interval between similar calls). Negative value disables caching.
|
||||
cache_ttl: 15s # Sidechain cache TTL value (min interval between similar calls).
|
||||
# Negative value disables caching. A zero value sets the default value.
|
||||
# Default value: block time. It is recommended to have this value less or equal to block time.
|
||||
# Cached entities: containers, container lists, eACL tables.
|
||||
container_cache_size: 100 # container_cache_size is is the maximum number of containers in the cache.
|
||||
|
|
Loading…
Reference in a new issue