Skip to content

Reduce redundant API calls in getPrivileges() using courseId cache #13454#14328

Open
prachitjain wants to merge 1 commit into
TEAMMATES:masterfrom
prachitjain:update-getPrivilege
Open

Reduce redundant API calls in getPrivileges() using courseId cache #13454#14328
prachitjain wants to merge 1 commit into
TEAMMATES:masterfrom
prachitjain:update-getPrivilege

Conversation

@prachitjain

@prachitjain prachitjain commented Jun 23, 2026

Copy link
Copy Markdown

#13454 This is the issue number.

Fixes #13454
These changes reduces the redundant api calls.

Outline of Solution

  1. Created a map (At class level) that stores previously fetches results.
  2. Wrapped each API call with shareReplay.
  3. Now loadConstructorPrivilege is called once per unique courseId

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

Hi @prachitjain, thank you for your interest in contributing to TEAMMATES!
However, your PR does not appear to follow our contributing guidelines:

  • Title must start with the issue number the PR is fixing in square brackets, e.g. [#<issue-number>]

Please address the above before we proceed to review your PR.

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.

Refactor instructor search page to remove unnecessary api calls

1 participant