Introduce a private variable inside Enforcer class to remember
status of the last policy syntax checks in order to avoid
redundant calls to the check_rules() method.
Having this flag makes the whole rules mechanism faster, as under
certain conditions check_rules() method was being executed
multiple times even when not needed.
Change-Id: Id3992fc0cb567451049a12ebdc6851e737573bb8
Closes-bug: #1723030
Co-Authored-By: Ben Nemec <email address hidden>
(cherry picked from commit 909a1ea3a7aceb6e0637058b9c6a53d14043d6d1)
Reviewed: https:/ /review. openstack. org/584082 /git.openstack. org/cgit/ openstack/ oslo.policy/ commit/ ?id=3e382060017 4a67933cc1dd986 066354bf3c25d3
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 3e3820600174a67 933cc1dd9860663 54bf3c25d3
Author: Mateusz Kowalski <email address hidden>
Date: Tue Oct 24 09:32:45 2017 +0200
Avoid redundant policy syntax checks
Introduce a private variable inside Enforcer class to remember
status of the last policy syntax checks in order to avoid
redundant calls to the check_rules() method.
Having this flag makes the whole rules mechanism faster, as under
certain conditions check_rules() method was being executed
multiple times even when not needed.
Change-Id: Id3992fc0cb5674 51049a12ebdc685 1e737573bb8 e0637058b9c6a53 d14043d6d1)
Closes-bug: #1723030
Co-Authored-By: Ben Nemec <email address hidden>
(cherry picked from commit 909a1ea3a7aceb6