code: func newDbCache(ldb *leveldb.DB, store *blockStore, maxSize uint64, flushIntervalSecs uint32) *dbCache {
  	return &dbCache{
  		ldb:           ldb,
  		store:         store,
  		maxSize:       maxSize,
  		flushInterval: time.Second * time.Duration(flushIntervalSecs),
  		lastFlush:     time.Now(),
  		cachedKeys:    treap.NewImmutable(),
  		cachedRemove:  treap.NewImmutable(),
  	}
  }
docs: // newDbCache returns a new database cache instance backed by the provided
  // leveldb instance.  The cache will be flushed to leveldb when the max size
  // exceeds the provided value or it has been longer than the provided interval
  // since the last flush.