fix(backend): prevent caching of None graph results to handle dynamic permissions

When a graph is not found/accessible, we now clear the cache entry rather than
caching the None result. This prevents issues with store listing permissions
where a graph becomes accessible after approval but the cache still returns
the old 'not found' result.
This commit is contained in:
Swifty
2025-09-24 18:08:13 +02:00
parent ee4feff8c2
commit eb94503de8

View File

@@ -672,6 +672,9 @@ async def get_graph(
version=version,
user_id=user_id,
)
# If graph not found, clear cache entry as permissions may have changed
if not graph:
cache.get_cached_graph.cache_delete(graph_id, version, user_id)
else:
graph = await graph_db.get_graph(
graph_id,