// Performs dogpile effect-aware get for the given item.Key.
//
// This is an extension to memcache protocol, so it isn't supported
// by the original memcache server.
//
// Returns ErrCacheMiss on cache miss. It is expected that the caller
// will create and store in the cache an item on cache miss during the given
// graceDuration interval.
Performs dogpile effect-aware get for the given item.Key.

This is an extension to memcache protocol, so it isn't supported
by the original memcache server.

Returns ErrCacheMiss on cache miss. It is expected that the caller
will create and store in the cache an item on cache miss during the given
graceDuration interval.
// Performs dogpile effect - aware get for the given item . Key . // // This is an extension to memcache protocol so it isn ' t supported // by the original memcache server . // // Returns ErrCacheMiss on cache miss . It is expected that the caller // will create and store in the cache an item on cache miss during the given // graceDuration interval .
func (c *Client) GetDe(item *Item, graceDuration time.Duration) error {
	if !validateKey(item.Key) {
		return ErrMalformedKey
	}
	var t taskGetDe
	for {
		t.item = item
		t.graceDuration = graceDuration
		if err := c.do(&t); err != nil {
			return err
		}
		if t.wouldBlock {
			time.Sleep(time.Millisecond * time.Duration(100))
			continue
		}
		if !t.found {
			return ErrCacheMiss
		}
		return nil
	}
}
func ( c * Client ) GetDe ( item * Item , graceDuration time . Duration ) error { if ! validateKey ( item . Key ) { return ErrMalformedKey } var t taskGetDe for { t . item = item t . graceDuration = graceDuration if err := c . do ( & t ) ; err != nil { return err } if t . wouldBlock { time . Sleep ( time . Millisecond * time . Duration ( 100 ) ) continue } if ! t . found { return ErrCacheMiss } return nil } }
Performs dogpile effect-aware get for the given item.Key.
Performs dogpile effect - aware get for the given item . Key .