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

Add request caching with low TTL #32

Open
antoniomuso opened this issue Jan 12, 2023 · 8 comments
Open

Add request caching with low TTL #32

antoniomuso opened this issue Jan 12, 2023 · 8 comments
Labels
good first issue Good for newcomers

Comments

@antoniomuso
Copy link
Contributor

antoniomuso commented Jan 12, 2023

We can add request caching with a lower TTL to reduce the number of duplicated requests.

This should also be done by caching the stale responses.

@antoniomuso antoniomuso changed the title Add request caching with low ttl Add request caching with low TTL Jan 12, 2023
@JellyBellyDev
Copy link
Member

Good, but I think this has higher priority #7, no?

@antoniomuso
Copy link
Contributor Author

antoniomuso commented Jan 12, 2023

Yes, it has, but #7 is the more complicated feature because it depends on #8 , And to do this, we have to create a backend part for this plugin with a Processor. The Processor should enrich the component with the GitLab project-id.

@antoniomuso antoniomuso added the good first issue Good for newcomers label Jan 12, 2023
@JellyBellyDev
Copy link
Member

@antoniomuso all clear, thank you

@simonecorsi
Copy link
Collaborator

This could benefit from an LRU cache instead of a fixed for all TTL!

@antoniomuso
Copy link
Contributor Author

I am just thinking of simply changing the cache policy of fetch https://developer.mozilla.org/en-US/docs/Web/API/Request/cache#value

@Parsifal-M
Copy link
Contributor

I am just thinking of simply changing the cache policy of fetch https://developer.mozilla.org/en-US/docs/Web/API/Request/cache#value

Which did you have in mind? Could possibly help out with this 👍

@antoniomuso
Copy link
Contributor Author

antoniomuso commented Feb 27, 2023

Now that we have the backend part, we can handle caching from the server side. This can be done by changing the cache-control header with TTL equal to 0 with a TTL of 10 seconds. We can also allow the user to configure a custom TTL in the app-config.yaml.

@JellyBellyDev JellyBellyDev added the hacktoberfest https://hacktoberfest.digitalocean.com/ label Oct 2, 2023
@simonecorsi simonecorsi removed the hacktoberfest https://hacktoberfest.digitalocean.com/ label Dec 4, 2023
Copy link

github-actions bot commented Jan 5, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jan 5, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2024
@antoniomuso antoniomuso reopened this Aug 28, 2024
@github-actions github-actions bot removed the Stale label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants