Parcourir la source

Merge branch 'acls_cache_fix' of https://github.com/gravitl/netmaker into NET-1784

abhishek9686 il y a 9 mois
Parent
commit
3101d29526
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      logic/acls.go

+ 3 - 0
logic/acls.go

@@ -173,6 +173,9 @@ func InsertAcl(a models.Acl) error {
 func GetAcl(aID string) (models.Acl, error) {
 	a := models.Acl{}
 	if servercfg.CacheEnabled() {
+		if len(aclCacheMap) == 0 {
+			_ = listAcls()
+		}
 		var ok bool
 		a, ok = getAclFromCache(aID)
 		if ok {