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

PoC with response and API caching #372

Open
wants to merge 6 commits into
base: development
Choose a base branch
from
Open

Conversation

lwesterhof
Copy link
Member

This PR adds caching for Flask responses to avoid re-rendering templates, improving performance. It introduces API caching for a limited set of endpoints with defined timeouts.

Additionally, some API calls have been moved to the client side to leverage the template cache, further enhancing efficiency. Certain API calls will trigger cache clearing to ensure users receive up-to-date information.

@lwesterhof lwesterhof force-pushed the portal-caching branch 12 times, most recently from 42111c9 to 00d8cbc Compare November 6, 2024 15:27
@lwesterhof lwesterhof force-pushed the portal-caching branch 3 times, most recently from 175d723 to 3e922b4 Compare November 18, 2024 12:15
@FuHsinyu
Copy link
Member

Perhaps it is already in your TODOs, a note is that I encountered an error of flask_session version is outdated in the requirement.txt. Thus, importing flask_session.filesystem reported an error. Upgrading flask_session to 0.8.0 resolved the issue.

@lwesterhof
Copy link
Member Author

Yeah, I already upgraded the versions in development. Will merge with this branch soon.

@lwesterhof lwesterhof marked this pull request as ready for review January 8, 2025 10:04
@lwesterhof lwesterhof requested a review from FuHsinyu January 8, 2025 10:06
cache_config.py Outdated Show resolved Hide resolved
cache_config.py Outdated Show resolved Hide resolved
@lwesterhof lwesterhof force-pushed the portal-caching branch 2 times, most recently from 609182d to f272bf3 Compare January 13, 2025 08:55
@lwesterhof lwesterhof force-pushed the portal-caching branch 2 times, most recently from badef7b to 9f1d927 Compare January 13, 2025 08:59
cache_config.py Outdated Show resolved Hide resolved
cache_config.py Outdated Show resolved Hide resolved
lwesterhof and others added 2 commits January 16, 2025 11:15
cache_config.py Outdated Show resolved Hide resolved
cache_config.py Outdated Show resolved Hide resolved
@claravox
Copy link
Contributor

claravox commented Jan 20, 2025

Maybe a bit out of the scope of this PR, but should we consider switching to a redis alternative?

)
}
if (result.status === 'ok') {
// Keep track of which rows have been
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Keep track of which rows have been
// Keep track of which rows have been updated

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.

3 participants