consul: Provide ETag to avoid expensive policy fetch

This commit is contained in:
Armon Dadgar 2014-08-18 15:20:21 -07:00
parent 7cd10c807f
commit e56007753d
1 changed files with 3 additions and 0 deletions

View File

@ -112,6 +112,9 @@ func (s *Server) lookupACL(id, authDC string) (acl.ACL, error) {
Datacenter: authDC,
ACL: id,
}
if cached != nil {
args.ETag = cached.ETag
}
var out structs.ACLPolicy
err := s.RPC("ACL.GetPolicy", &args, &out)