func cacheKey(k *datastore.Key) string {
	key := cacheKeyPrefix + MemcacheKey(k)
	if len(key) > memcacheMaxKeySize {
		h, err := blake2b.New(24, nil)
		if err != nil {
			panic(fmt.Sprintf("Unexpected error initializing blake2b: %v", err))
		}
		h.Write([]byte(key))
		hash := h.Sum(make([]byte, 0, 24))
		encoded := make([]byte, 30, 30)
		ascii85.Encode(encoded, hash)
		key = string(encoded)
	}
	return key
}
cacheKey returns the fully legal string key used for cache systems
package goon
import (
	"context"
	"encoding/ascii85"
	"fmt"
	"net/http"
	"path/filepath"
	"reflect"
	"runtime"
	"sync"
	"time"
	"golang.org/x/crypto/blake2b"
	"google.golang.org/appengine"
	"google.golang.org/appengine/datastore"
	"google.golang.org/appengine/log"
	"google.golang.org/appengine/memcache"
)
var (
	LogErrors = true
	LogTimeoutErrors = false
	MemcachePutTimeoutThreshold = 20 * 1024  
	MemcachePutTimeoutSmall = 5 * time.Millisecond
	MemcachePutTimeoutLarge = 1 * time.Millisecond
	MemcacheGetTimeout = 31250 * time.Microsecond  
	IgnoreFieldMismatch = true
)
var (
	propagateMemcachePutError = false
)
type Goon struct {
	Context       context.Context
	cache         *cache
	inTransaction bool
	txnCacheLock  sync.Mutex  
	toDelete      map[string]struct{}
	toDeleteMC    map[string]struct{}
	KindNameResolver KindNameResolver
}
var MemcacheKey = func(k *datastore.Key) string {
	return k.Encode()
}
var cacheKeyPrefix = fmt.Sprintf("g%X:", serializationFormatVersion)