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

Consider cache-control: public for /assets #23952

Open
silverwind opened this issue Apr 6, 2023 · 1 comment
Open

Consider cache-control: public for /assets #23952

silverwind opened this issue Apr 6, 2023 · 1 comment
Labels
performance/cpu type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@silverwind
Copy link
Member

silverwind commented Apr 6, 2023

Feature Description

As requested on Discord, I think it makes sense to have the assets that have contenthash in their filename cacheable by intermediary proxies via cache-control: public to take off some load from the gitea process.

For files that do not have contenthash like serviceworker.js and more, I'm not sure. I think we may have to exclude them or (ideally) change them to have a contenthash.

Also I do think we can raise the default cache duration for contenthash assets significantly. They are essentially immutable.

@silverwind silverwind added type/proposal The new feature has not been accepted yet but needs to be discussed first. type/feature Completely new functionality. Can only be merged if feature freeze is not active. performance/cpu type/enhancement An improvement of existing functionality and removed type/feature Completely new functionality. Can only be merged if feature freeze is not active. labels Apr 6, 2023
@silverwind
Copy link
Member Author

silverwind commented Apr 8, 2023

If serviceworker.js is the last holdout without contenthash, I would consider removing it. It serves no real purpose for Gitea, except being a unnecessary cache layer, while browser HTTP cache already works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance/cpu type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

1 participant