Add writes the given item, if no value already exists for its key. ErrNotStored is returned if that condition is not met.
(c context.Context, item *Item)
| 477 | // Add writes the given item, if no value already exists for its key. |
| 478 | // ErrNotStored is returned if that condition is not met. |
| 479 | func (cd Codec) Add(c context.Context, item *Item) error { |
| 480 | return singleError(cd.set(c, []*Item{item}, pb.MemcacheSetRequest_ADD)) |
| 481 | } |
| 482 | |
| 483 | // AddMulti is a batch version of Add. |
| 484 | // appengine.MultiError may be returned. |