Skip to content

Commit 027f470

Browse files
henrybarretogustavosbarreto
authored andcommitted
fix(api): remove namespace from cache when device count is increased
1 parent a1913a2 commit 027f470

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/store/mongo/namespace.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,5 +414,9 @@ func (s *Store) NamespaceIncrementDeviceCount(ctx context.Context, tenantID stri
414414
return store.ErrNoDocuments
415415
}
416416

417+
if err := s.cache.Delete(ctx, strings.Join([]string{"namespace", tenantID}, "/")); err != nil {
418+
log.Error(err)
419+
}
420+
417421
return nil
418422
}

0 commit comments

Comments
 (0)