NewCachingAuthorizer returns a new RegoAuthorizer that supports context based caching. To utilize the caching, the context passed to Authorize() must be created with 'WithCacheCtx(ctx)'.
(registry prometheus.Registerer)
| 308 | // caching. To utilize the caching, the context passed to Authorize() must be |
| 309 | // created with 'WithCacheCtx(ctx)'. |
| 310 | func NewCachingAuthorizer(registry prometheus.Registerer) Authorizer { |
| 311 | return Cacher(NewAuthorizer(registry)) |
| 312 | } |
| 313 | |
| 314 | // NewStrictCachingAuthorizer is mainly just for testing. |
| 315 | func NewStrictCachingAuthorizer(registry prometheus.Registerer) Authorizer { |
no test coverage detected