mirror of
https://github.com/gravitl/netmaker.git
synced 2025-11-02 13:04:11 +08:00
NET-735: HA Support (#2701)
* cache enabled option, cache hosts data if only enabled * cache nodes only when enabled * cache extclients only when enabled * cache acls only when enabled
This commit is contained in:
@@ -3,6 +3,7 @@ package nodeacls
|
||||
import (
|
||||
"github.com/gravitl/netmaker/database"
|
||||
"github.com/gravitl/netmaker/logic/acls"
|
||||
"github.com/gravitl/netmaker/servercfg"
|
||||
)
|
||||
|
||||
// CreateNodeACL - inserts or updates a node ACL on given network and adds to state
|
||||
@@ -87,6 +88,8 @@ func DeleteACLContainer(network NetworkID) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
acls.DeleteAclFromCache(acls.ContainerID(network))
|
||||
if servercfg.CacheEnabled() {
|
||||
acls.DeleteAclFromCache(acls.ContainerID(network))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user