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>
Reviewed: https:/ /review. openstack. org/511426 /git.openstack. org/cgit/ openstack/ oslo.policy/ commit/ ?id=909a1ea3a7a ceb6e0637058b9c 6a53d14043d6d1
Committed: https:/
Submitter: Zuul
Branch: master
commit 909a1ea3a7aceb6 e0637058b9c6a53 d14043d6d1
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
Closes-bug: #1723030
Co-Authored-By: Ben Nemec <email address hidden>