When the no_body option is enabled we just need to load the usage limits that are affected by the metrics included in the usage of the request, that is, the limits defined for those metrics plus any of their ancestors in the metrics hierarchy.
When no_body is disabled, we need to load all the usage limits because we need to include them in the response XML.
We were not distinguishing between both cases. This PR changes the transactor so it only loads the usage limits required for the request. This can reduce a lot the number of keys that we need to fetch from redis when no_body is enabled and the service has many metrics defined.
When the
no_body
option is enabled we just need to load the usage limits that are affected by the metrics included in the usage of the request, that is, the limits defined for those metrics plus any of their ancestors in the metrics hierarchy.When
no_body
is disabled, we need to load all the usage limits because we need to include them in the response XML.We were not distinguishing between both cases. This PR changes the transactor so it only loads the usage limits required for the request. This can reduce a lot the number of keys that we need to fetch from redis when
no_body
is enabled and the service has many metrics defined.