consul: Provide ETag to avoid expensive policy fetch
This commit is contained in:
parent
99db96e4ea
commit
6492f06a3e
|
@ -112,6 +112,9 @@ func (s *Server) lookupACL(id, authDC string) (acl.ACL, error) {
|
||||||
Datacenter: authDC,
|
Datacenter: authDC,
|
||||||
ACL: id,
|
ACL: id,
|
||||||
}
|
}
|
||||||
|
if cached != nil {
|
||||||
|
args.ETag = cached.ETag
|
||||||
|
}
|
||||||
var out structs.ACLPolicy
|
var out structs.ACLPolicy
|
||||||
err := s.RPC("ACL.GetPolicy", &args, &out)
|
err := s.RPC("ACL.GetPolicy", &args, &out)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue