[#419] cmd/node: Cache network maps read from sidechain

Implement LRU cache of eACL tables read from sidechain. Use it as a netmap
storage in neofs-node app. Current cache size is set to 10 (constant).

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-03-04 15:32:16 +03:00 committed by Leonard Lyubich
parent f9342aa562
commit 55dec28bbb
2 changed files with 87 additions and 1 deletions

View file

@ -65,7 +65,7 @@ func initMorphComponents(c *cfg) {
wrap, err := wrapper.New(cli)
fatalOnErr(err)
c.cfgObject.netMapStorage = wrap
c.cfgObject.netMapStorage = newCachedNetmapStorage(c.cfgNetmap.state, wrap)
c.cfgNetmap.wrapper = wrap
}