Skip to content

Commit

Permalink
Merge pull request #3224 from gravitl/acls_cache_fix
Browse files Browse the repository at this point in the history
initiliase acl cache
  • Loading branch information
abhishek9686 authored Nov 27, 2024
2 parents dbb44c2 + 698032a commit ea2a148
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions logic/acls.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,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 {
Expand Down

0 comments on commit ea2a148

Please sign in to comment.