code: func (c *TwoQueueCache) ensureSpace(recentEvict bool) {
  	// If we have space, nothing to do
  	recentLen := c.recent.Len()
  	freqLen := c.frequent.Len()
  	if recentLen+freqLen < c.size {
  		return
  	}
  
  	// If the recent buffer is larger than
  	// the target, evict from there
  	if recentLen > 0 && (recentLen > c.recentSize || (recentLen == c.recentSize && !recentEvict)) {
  		k, _, _ := c.recent.RemoveOldest()
  		c.recentEvict.Add(k, nil)
  		return
  	}
  
  	// Remove from the frequent list otherwise
  	c.frequent.RemoveOldest()
  }
docs: // ensureSpace is used to ensure we have space in the cache