Isolate tenant readback cache and prepare verified runtime release
Assistant: codex Assistant-Model: gpt-6.1-sol Assistant-Session: 01a126e1-76f8-7643-8cf3-e93336539ade
This commit is contained in:
parent
c460e2b0df
commit
1bb7cacc98
10 changed files with 188 additions and 13 deletions
|
|
@ -137,12 +137,12 @@ class ApplicationAccessReader:
|
|||
self.bound_applications = bound_applications
|
||||
self.cache_ttl = cache_ttl
|
||||
self.clock = clock
|
||||
self._cache: dict[tuple[str, str, str], _CacheEntry] = {}
|
||||
self._cache: dict[tuple[str, str, str, str], _CacheEntry] = {}
|
||||
|
||||
def rows(self, actor: Actor, session_key: str) -> tuple[ApplicationAccessRow, ...] | None:
|
||||
"""Return rendered rows, or None when the catalogue itself is unreadable."""
|
||||
now = self.clock()
|
||||
key = (session_key, actor.issuer, actor.subject)
|
||||
key = (session_key, actor.issuer, actor.subject, actor.tenant)
|
||||
entry = self._cache.get(key)
|
||||
if entry is None or entry.reuse_until <= now:
|
||||
entry = self._read(actor, now)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue