[#730] node/morph: Use disable_cache config param

Do not init caches for eACL, containers and netmap
if `disable_cache` config options is `true`, use
direct RPC calls instead.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-07-29 18:57:53 +03:00 committed by Alex Vanin
parent c423aa432a
commit e8665f6cef
10 changed files with 63 additions and 25 deletions

View file

@ -159,7 +159,7 @@ func (s *ttlContainerStorage) Get(cid *cid.ID) (*containerSDK.Container, error)
type ttlEACLStorage ttlNetCache
func newCachedEACLStorage(v eacl.Storage) eacl.Storage {
func newCachedEACLStorage(v eacl.Source) eacl.Source {
const (
eaclCacheSize = 100
eaclCacheTTL = 30 * time.Second