code: func (c *BufferLRU) Put(key int64, slice []byte) {
  	c.mut.Lock()
  	defer c.mut.Unlock()
  
  	if c.cache == nil {
  		c.actualSize = 0
  		c.cache = make(map[int64]*list.Element, 1000)
  		c.ll = list.New()
  	}
  
  	bufSize := FileSize(len(slice))
  	if ee, ok := c.cache[key]; ok {
  		oldBuf := ee.Value.(buffer)
  		// in this case bufSize is a delta: new size - old size
  		bufSize -= FileSize(len(oldBuf.Slice))
  		c.ll.MoveToFront(ee)
  		ee.Value = buffer{key, slice}
  	} else {
  		if bufSize > c.MaxSize {
  			return
  		}
  		ee := c.ll.PushFront(buffer{key, slice})
  		c.cache[key] = ee
  	}
  
  	c.actualSize += bufSize
  	for c.actualSize > c.MaxSize {
  		last := c.ll.Back()
  		lastObj := last.Value.(buffer)
  		lastSize := FileSize(len(lastObj.Slice))
  
  		c.ll.Remove(last)
  		delete(c.cache, lastObj.Key)
  		c.actualSize -= lastSize
  	}
  }
docs: // Put puts a buffer into the cache. If the buffer is already in the cache, it
  // will be marked as used. Otherwise, it will be inserted. A buffers might
  // be evicted to make room for the new one.