//Set calls the cache service to set a new key.
Set calls the cache service to set a new key.
// Set calls the cache service to set a new key .
func Set(ctx context.Context, client cache.CacheClient, key, value string) {
	request := &cache.SetRequest{
		Key:   key,
		Value: []byte(value),
	}
	response, err := client.Set(context.Background(), request)
	if err == nil && response.Ok {
		fmt.Printf("key \"%s\" added to the cache\n", request.GetKey())
	} else {
		fmt.Printf("could not set key \"%s\", \"%v\"\n", key, err)
	}
}
func Set ( ctx context . Context , client cache . CacheClient , key , value string ) { request := & cache . SetRequest { Key : key , Value : [ ] byte ( value ) , } response , err := client . Set ( context . Background ( ) , request ) if err == nil && response . Ok { fmt . Printf ( " \" \" \n " , request . GetKey ( ) ) } else { fmt . Printf ( " \" \" \" \" \n " , key , err ) } }
Set calls the cache service to set a new key.
Set calls the cache service to set a new key .