code: func (c *cleaner) Put(key []byte, rlp []byte) error {
  	hash := common.BytesToHash(key)
  
  	// If the node does not exist, we're done on this path
  	node, ok := c.db.dirties[hash]
  	if !ok {
  		return nil
  	}
  	// Node still exists, remove it from the flush-list
  	switch hash {
  	case c.db.oldest:
  		c.db.oldest = node.flushNext
  		c.db.dirties[node.flushNext].flushPrev = common.Hash{}
  	case c.db.newest:
  		c.db.newest = node.flushPrev
  		c.db.dirties[node.flushPrev].flushNext = common.Hash{}
  	default:
  		c.db.dirties[node.flushPrev].flushNext = node.flushNext
  		c.db.dirties[node.flushNext].flushPrev = node.flushPrev
  	}
  	// Remove the node from the dirty cache
  	delete(c.db.dirties, hash)
  	c.db.dirtiesSize -= common.StorageSize(common.HashLength + int(node.size))
  	if node.children != nil {
  		c.db.dirtiesSize -= common.StorageSize(cachedNodeChildrenSize + len(node.children)*(common.HashLength+2))
  	}
  	// Move the flushed node into the clean cache to prevent insta-reloads
  	if c.db.cleans != nil {
  		c.db.cleans.Set(string(hash[:]), rlp)
  	}
  	return nil
  }
docs: // Put reacts to database writes and implements dirty data uncaching. This is the
  // post-processing step of a commit operation where the already persisted trie is
  // removed from the dirty cache and moved into the clean cache. The reason behind
  // the two-phase commit is to ensure ensure data availability while moving from
  // memory to disk.