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

Method Delete

memcache/memcache.go:740–744  ·  view source on GitHub ↗

Delete deletes the item with the provided key. The error ErrCacheMiss is returned if the item didn't already exist in the cache.

(key string)

Source from the content-addressed store, hash-verified

738// Delete deletes the item with the provided key. The error ErrCacheMiss is
739// returned if the item didn't already exist in the cache.
740func (c *Client) Delete(key string) error {
741 return c.withKeyRw(key, func(conn *conn) error {
742 return writeExpectf(conn.rw, resultDeleted, "delete %s\r\n", key)
743 })
744}
745
746// DeleteAll deletes all items in the cache.
747func (c *Client) DeleteAll() error {

Callers 1

testWithClientFunction · 0.80

Calls 2

withKeyRwMethod · 0.95
writeExpectfFunction · 0.85

Tested by 1

testWithClientFunction · 0.64