Skip to content

Commit 7d037b3

Browse files
heiytorgustavosbarreto
authored andcommitted
fix: correct device cache key format in DeviceUpdate
Fix inconsistent cache key format by using "device/${uid}" instead of "device${uid}/" to match the expected cache key pattern used elsewhere in the codebase.
1 parent bf3b988 commit 7d037b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/store/mongo/device.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ func (s *Store) DeviceUpdate(ctx context.Context, tenantID, uid string, changes
450450
return store.ErrNoDocuments
451451
}
452452

453-
if err := s.cache.Delete(ctx, "device"+uid+"/"); err != nil {
453+
if err := s.cache.Delete(ctx, "device"+"/"+uid); err != nil {
454454
logrus.WithError(err).WithField("uid", uid).Error("cannot delete device from cache")
455455
}
456456

0 commit comments

Comments
 (0)