mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
3ee6fdcf30
Previously we let it use the default namespace, which meant that every cached evaluation would use the same query on the compiler.. which isn't correct. They need to be unique per path. We'll now use a hash of the path (since it needs to be a valid var). While doing this the logic for the Rego opts was refactored in `makeRego` to only define the list a single time.. this should help reduce the risk of any regressions in the future. Fixes: #2247 Signed-off-by: Patrick East <east.patrick@gmail.com>