43683f543e
This adds caching of resource limits for an Enforcer in order to improve performance when repeated limit checks are needed. The cache lasts the lifetime of an Enforcer and is enabled by default. It can be disabled by passing cache=False when instantiating an Enforcer. One usage pattern for a caching Enforcer would be to create an Enforcer per service request so that the caching lives only as long as the request. Change-Id: I8e43dceec76aecd2b2ae23a137e56519efe29777
8 lines
295 B
YAML
8 lines
295 B
YAML
---
|
|
features:
|
|
- |
|
|
``Enforcer`` objects now cache limits by default for the lifetime of the
|
|
object to provide improved performance when multiple calls of ``enforce()``
|
|
are needed. This behavior is controlled by the boolean ``cache`` keyword
|
|
argument to the ``__init__`` method.
|