refactor(go): keep realtime cache vin scoped
This commit is contained in:
@@ -29,6 +29,9 @@ func NewRepository(client *redis.Client, cfg Config) *Repository {
|
||||
|
||||
func (r *Repository) Update(ctx context.Context, env envelope.FrameEnvelope) error {
|
||||
vin := strings.TrimSpace(env.VIN)
|
||||
if vin == "" {
|
||||
return nil
|
||||
}
|
||||
vehicleKey := strings.TrimSpace(env.VehicleKey())
|
||||
if vehicleKey == "" || strings.HasSuffix(vehicleKey, ":unknown") {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user