Attempt aggressive caching
This commit is contained in:
parent
311eb6988c
commit
46da44d520
1 changed files with 2 additions and 6 deletions
|
@ -455,15 +455,11 @@ func (i *Indexer) getCoin(
|
|||
m, ok := i.coinMap[coinIdentifier.Identifier]
|
||||
i.coinMapMutex.RUnlock()
|
||||
if ok {
|
||||
fmt.Println("used cache", coinIdentifier.Identifier)
|
||||
return m.Coin, m.Account, nil
|
||||
}
|
||||
|
||||
return i.coinStorage.GetCoinTransactional(
|
||||
ctx,
|
||||
dbTx,
|
||||
coinIdentifier,
|
||||
)
|
||||
// THis is SUPER dangerous (won't survive restart)
|
||||
return nil, nil, storage.ErrCoinNotFound
|
||||
}
|
||||
|
||||
func (i *Indexer) findCoin(
|
||||
|
|
Loading…
Reference in a new issue