data/cache.go
func (s *Cache) Set(key string, value interface{}) error {
	if s.removeExpired() == raiqub.WriteLocked {
		s.Unlock()
		s.RLock()
	}
	defer s.RUnlock()

	v, err := s.unsafeGet(key)
	if err != nil {
		return err
	}

	v.Postpone()
	v.value = value
	return nil
}
func (s *Cache) Set(key string, value interface{}) error {
	if s.removeExpired() == raiqub.WriteLocked {
		s.Unlock()
		s.RLock()
	}
	defer s.RUnlock()

	v, err := s.unsafeGet(key)
	if err != nil {
		return err
	}

	v.Postpone()
	v.value = value
	return nil
}
func ( s * Cache ) Set ( key string , value interface { } ) error { if s . removeExpired ( ) == raiqub . WriteLocked { s . Unlock ( ) s . RLock ( ) } defer s . RUnlock ( ) v , err := s . unsafeGet ( key ) if err != nil { return err } v . Postpone ( ) v . value = value return nil }
// Set sets the value of specified key.
//
// Errors:
// InvalidKeyError when requested key could not be found.
Set sets the value of specified key . Errors : InvalidKeyError when requested key could not be found .