data/cache.go
func (s *Cache) Delete(key string) error {
	lckStatus := s.removeExpired()

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

	if lckStatus == raiqub.ReadLocked {
		s.RUnlock()
		s.Lock()
	}
	defer s.Unlock()

	delete(s.values, key)
	return nil
}
func (s *Cache) Delete(key string) error {
	lckStatus := s.removeExpired()

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

	if lckStatus == raiqub.ReadLocked {
		s.RUnlock()
		s.Lock()
	}
	defer s.Unlock()

	delete(s.values, key)
	return nil
}
func ( s * Cache ) Delete ( key string ) error { lckStatus := s . removeExpired ( ) _ , err := s . unsafeGet ( key ) if err != nil { return err } if lckStatus == raiqub . ReadLocked { s . RUnlock ( ) s . Lock ( ) } defer s . Unlock ( ) delete ( s . values , key ) return nil }
// Delete deletes the specified key:value.
//
// Errors:
// InvalidKeyError when requested key could not be found.
Delete deletes the specified key : value . Errors : InvalidKeyError when requested key could not be found .