func (r redisRepo) Store(k GenericKey) error {
	data, err := json.Marshal(k)
	if err != nil {
		return err
	}

	// Add to account set if an hash is given
	if k.GetAddressHash() != nil {
		_, _ = r.client.SAdd(r.context, r.createRedisKey(k.GetAddressHash().String()), k.GetID())
	}

	_, err = r.client.Set(r.context, r.createRedisKey(k.GetID()), data, 0)
	return err
}
// Store the given key in the repository
Store the given key in the repository
// Store the given key in the repository
func (r redisRepo) Store(k GenericKey) error {
	data, err := json.Marshal(k)
	if err != nil {
		return err
	}
	if k.GetAddressHash() != nil {
		_, _ = r.client.SAdd(r.context, r.createRedisKey(k.GetAddressHash().String()), k.GetID())
	}
	_, err = r.client.Set(r.context, r.createRedisKey(k.GetID()), data, 0)
	return err
}
func ( r redisRepo ) Store ( k GenericKey ) error { data , err := json . Marshal ( k ) if err != nil { return err } if k . GetAddressHash ( ) != nil { _ , _ = r . client . SAdd ( r . context , r . createRedisKey ( k . GetAddressHash ( ) . String ( ) ) , k . GetID ( ) ) } _ , err = r . client . Set ( r . context , r . createRedisKey ( k . GetID ( ) ) , data , 0 ) return err }
Store the given key in the repository
Store the given key in the repository
// Add to account set if an hash is given