Skip to content

Commit

Permalink
add workaround impl to ignore arg for cache key generation (relates to
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault committed Dec 7, 2021
1 parent 7535627 commit 1def4a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion magpie/adapter/magpieowssecurity.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ def __init__(self, container):
self.twitcher_ssl_verify = asbool(self.settings.get("twitcher.ows_proxy_ssl_verify", True))
self.twitcher_protected_path = self.settings.get("twitcher.ows_proxy_protected_path", "/ows")

@cache_region("service")
# NOTE: Parameter 'ignore_args' is unofficial from 'https://github.com/crim-ca/beaker/commit/0ac88b'.
# Using this parameter, the request UUID is ignored to avoid generating distinct cache keys for each
# new inbound request, nullifying the whole point of caching similar requests to service mapping.
@cache_region("service", ignore_args=["request_uuid"])
def _get_service_cached(self, service_name, request_uuid):
# type: (Str, uuid.UUID) -> Tuple[ServiceInterface, Dict[str, AnyValue]]
"""
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ alembic>=1.3.0,<1.5
# leave http port until merged:
authomatic[OpenID] @ https://github.com/fmigneault/authomatic/archive/httplib-port.zip
bcrypt>=3.1.6
beaker
# FIXME: integrate when implemnted by official package (see https://github.com/bbangert/beaker/issues/201)
beaker @ https://github.com/crim-ca/beaker/commit/0ac88bcd8cca063a571fc385ffbe9bcc8acaa690
colander
cornice<5; python_version < "3"
cornice; python_version >= "3"
Expand Down

0 comments on commit 1def4a7

Please sign in to comment.