Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove DB call on Landing Page #36

Open
nishant-nayak opened this issue Oct 6, 2023 · 0 comments
Open

Remove DB call on Landing Page #36

nishant-nayak opened this issue Oct 6, 2023 · 0 comments
Assignees
Labels
backend Django related issues enhancement New feature or request p2 Priority 2 tasks. Affects most users
Milestone

Comments

@nishant-nayak
Copy link
Member

Currently, the landing page makes a call to the DB to fetch the information about all societies to render the Societies section on the page. This data is essentially static and is not likely to change frequently. 2 possible alternatives to solve this unnecessary overhead call to the DB include:

  1. Adding all the society information statically. This removes the DB call but adds additional developer effort if we were to add/remove societies from the student branch.
  2. Use a caching layer like Redis to cache DB responses. This will still incur a call to an external service, but the data fetch time should be much shorter.

(1) seems like a better fix for the current use case, but if we decide to integrate a caching layer then we could think about caching the DB response into the cache.

@nishant-nayak nishant-nayak added enhancement New feature or request backend Django related issues p2 Priority 2 tasks. Affects most users labels Oct 6, 2023
@nishant-nayak nishant-nayak added this to the v0.1 milestone Oct 6, 2023
@nishant-nayak nishant-nayak self-assigned this Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Django related issues enhancement New feature or request p2 Priority 2 tasks. Affects most users
Projects
None yet
Development

No branches or pull requests

1 participant