MCPcopy
hub / github.com/bradfitz/gomemcache / Add

Method Add

memcache/memcache.go:612–614  ·  view source on GitHub ↗

Add writes the given item, if no value already exists for its key. ErrNotStored is returned if that condition is not met.

(item *Item)

Source from the content-addressed store, hash-verified

610// Add writes the given item, if no value already exists for its
611// key. ErrNotStored is returned if that condition is not met.
612func (c *Client) Add(item *Item) error {
613 return c.onItem(item, (*Client).add)
614}
615
616func (c *Client) add(rw *bufio.ReadWriter, item *Item) error {
617 return c.populateOne(rw, "add", item)

Callers 3

computeExpTimeFunction · 0.80
extendDeadlineMethod · 0.80
testWithClientFunction · 0.80

Calls 1

onItemMethod · 0.95

Tested by 2

computeExpTimeFunction · 0.64
testWithClientFunction · 0.64