code: func (sc *StorageCache) Put(c context.Context, key storage.CacheKey, data []byte, exp time.Duration) {
  	ct := sc.compressionThreshold
  	if ct <= 0 {
  		ct = defaultCompressionThreshold
  	}
  
  	var buf bytes.Buffer
  	buf.Grow(len(data) + 1)
  
  	if len(data) < ct {
  		// Do not compress the item. Write a "0x00" to indicate that it is
  		// not compressed.
  		if err := buf.WriteByte(0x00); err != nil {
  			log.WithError(err).Warningf(c, "Failed to write compression byte.")
  			return
  		}
  		if _, err := buf.Write(data); err != nil {
  			log.WithError(err).Warningf(c, "Failed to write storage cache data.")
  			return
  		}
  	} else {
  		// Compress the item. Write a "0x01" to indicate that it is compressed.
  		if err := buf.WriteByte(0x01); err != nil {
  			log.WithError(err).Warningf(c, "Failed to write compression byte.")
  			return
  		}
  
  		zw := zlib.NewWriter(&buf)
  		if _, err := zw.Write(data); err != nil {
  			log.WithError(err).Warningf(c, "Failed to compress storage cache data.")
  			zw.Close()
  			return
  		}
  		if err := zw.Close(); err != nil {
  			log.WithError(err).Warningf(c, "Failed to close compressed storage cache data.")
  			return
  		}
  	}
  
  	storageCache.LRU(c).Put(c, key, buf.Bytes(), exp)
  }
docs: // Put implements storage.Cache.