events

package
v0.0.0-...-941a20e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

README

Step 4: storing temporary results in Memcache

In the previous step we ended up with an application that was wasting time and network resources by sending a new request to the weather API for each event, every time someone listed the events.

Now we will fix that by using App Engine Memcache. This is simply a fully managed Memcache instance, you don't need to do anything to start using it! Isn't that cool?

Once you're done with this exercise you will see that your application is much faster, and it consumes less resources.

Congratulations, you're done! You can check your code comparing it to the one in step 5, or go back to the instructions for the last instructions.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Title       string    `json:"title"`
	Description string    `json:"description"`
	Date        time.Time `json:"date"`
	Location    string    `json:"location"`
	Weather     *Weather  `json:"weather" datastore:"-"`
}

Event contains the information related to an event.

type Weather

type Weather struct {
	Description string `json:"description"`
	Icon        string `json:"icon"`
}

Weather contains the description and icon for a weather condition.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL