Skip to content

Conversation

@joaocfernandes
Copy link

Details

Improve execution time for calls to groups/.

For situations where a huge number of groups exists and a huge number of users scattered around them, we can save time avoiding re-serialization, if the serialization result for each user is cached by request.

This has the tradeoff of creating a cache per request. The invalidation model is simple as it only lives for the period of the request and therefore it's expected a low-memory footprint , if page_size is within a reasonable value.


Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make docs)

@netlify
Copy link

netlify bot commented Nov 29, 2025

Deploy Preview for authentik-docs canceled.

Name Link
🔨 Latest commit f945662
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/692ad06c026d0b0008efe5bc

@netlify
Copy link

netlify bot commented Nov 29, 2025

Deploy Preview for authentik-integrations canceled.

Name Link
🔨 Latest commit f945662
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/692ad06e38aa2f0008509813

@netlify
Copy link

netlify bot commented Nov 29, 2025

Deploy Preview for authentik-storybook canceled.

Name Link
🔨 Latest commit f945662
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/692ad06eee88930008531c01

- Add cache initialization in GroupViewSet.initialize_request()
@joaocfernandes joaocfernandes force-pushed the jf/groups-serialization-cache branch from 33a5eb9 to f945662 Compare November 29, 2025 10:52
@joaocfernandes joaocfernandes changed the base branch from main to version-2025.10 November 29, 2025 10:53
@joaocfernandes joaocfernandes marked this pull request as ready for review November 29, 2025 11:22
@joaocfernandes joaocfernandes requested a review from a team as a code owner November 29, 2025 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant