Skip to content

Commit

Permalink
Added documentation to the Touch method.
Browse files Browse the repository at this point in the history
  • Loading branch information
craigmj committed Sep 2, 2013
1 parent f872c08 commit 82fef77
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions memcache/memcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ func (c *Client) Get(key string) (item *Item, err error) {
return
}

// Touch updates the expiry for the given key. The seconds parameter is either
// a Unix timestamp or, if seconds is less than 1 month, the number of seconds
// into the future at which time the item will expire. ErrCacheMiss is returned if the
// key is not in the cache. The key must be at most 250 bytes in length.
func (c *Client) Touch(key string, seconds int32) (err error) {
return c.withKeyAddr(key, func(addr net.Addr) error {
return c.touchFromAddr(addr, []string{key}, seconds)
Expand Down

0 comments on commit 82fef77

Please sign in to comment.