code: func (e *Store) calculateTTL(obj runtime.Object, defaultTTL int64, update bool) (ttl uint64, err error) {
  	// TODO: validate this is assertion is still valid.
  
  	// etcd may return a negative TTL for a node if the expiration has not
  	// occurred due to server lag - we will ensure that the value is at least
  	// set.
  	if defaultTTL < 0 {
  		defaultTTL = 1
  	}
  	ttl = uint64(defaultTTL)
  	if e.TTLFunc != nil {
  		ttl, err = e.TTLFunc(obj, ttl, update)
  	}
  	return ttl, err
  }
docs: // calculateTTL is a helper for retrieving the updated TTL for an object or
  // returning an error if the TTL cannot be calculated. The defaultTTL is
  // changed to 1 if less than zero. Zero means no TTL, not expire immediately.