示例#1
0
文件: account.go 项目: icza/iczagps
// CacheAccount puts the specified Account into the cache (memcache).
func CacheAccount(c appengine.Context, acc *ds.Account) {
	mk := prefixAccForUID + acc.UserID

	if err := memcache.Set(c, &memcache.Item{Key: mk, Value: acc.Encode(), Expiration: cachedAccExpiration}); err != nil {
		c.Warningf("Failed to set %s in memcache: %v", mk, err)
	}
}