code: func NewEnvelopeTransformer(envelopeService Service, cacheSize int, baseTransformerFunc func(cipher.Block) value.Transformer) (value.Transformer, error) {
  	if cacheSize == 0 {
  		cacheSize = defaultCacheSize
  	}
  	cache, err := lru.New(cacheSize)
  	if err != nil {
  		return nil, err
  	}
  	return &envelopeTransformer{
  		envelopeService:     envelopeService,
  		transformers:        cache,
  		baseTransformerFunc: baseTransformerFunc,
  	}, nil
  }
docs: // NewEnvelopeTransformer returns a transformer which implements a KEK-DEK based envelope encryption scheme.
  // It uses envelopeService to encrypt and decrypt DEKs. Respective DEKs (in encrypted form) are prepended to
  // the data items they encrypt. A cache (of size cacheSize) is maintained to store the most recently
  // used decrypted DEKs in memory.