code: func backCursor(c context.Context, bid BuilderID, limit int, thisCursor, nextCursor string) string {
  	memcacheKey := func(cursor string) string {
  		key := fmt.Sprintf("%s:%d:%s", bid.String(), limit, cursor)
  		blob := sha1.Sum([]byte(key))
  		encoded := base64.StdEncoding.EncodeToString(blob[:])
  		return "cursors:buildbucket_builders:" + encoded
  	}
  
  	prevCursor := ""
  	if thisCursor != "" {
  		if item, err := memcache.GetKey(c, memcacheKey(thisCursor)); err == nil {
  			prevCursor = string(item.Value())
  		}
  	}
  	if nextCursor != "" {
  		item := memcache.NewItem(c, memcacheKey(nextCursor))
  		if thisCursor == "" {
  			item.SetValue([]byte("EMPTY"))
  		} else {
  			item.SetValue([]byte(thisCursor))
  		}
  		item.SetExpiration(24 * time.Hour)
  		memcache.Set(c, item)
  	}
  	return prevCursor
  }
docs: // backCursor implements bidirectional cursors with forward-only datastore
  // cursors by storing a map for cursor -> prevCursor in memcache.
  // backCursor returns a previous cursor given thisCursor, and caches thisCursor
  // to be the previous cursor of nextCursor.