From cd283654ebadc6606a9332fb2da7e55742165c93 Mon Sep 17 00:00:00 2001 From: Ben Toogood Date: Tue, 26 May 2020 15:53:28 +0100 Subject: [PATCH] Cache Rules --- auth/service/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/service/service.go b/auth/service/service.go index eb6dc004..9c3bd323 100644 --- a/auth/service/service.go +++ b/auth/service/service.go @@ -112,7 +112,7 @@ func (s *svc) Rules(opts ...auth.RulesOption) ([]*auth.Rule, error) { options.Context = context.TODO() } - rsp, err := s.rules.List(options.Context, &pb.ListRequest{}) + rsp, err := s.rules.List(options.Context, &pb.ListRequest{}, client.WithCache(time.Second*30)) if err != nil { return nil, err }