Closed thehowl closed 6 years ago
FWIW, I have succeeded in making contribution to unknwon's repos in the past (https://github.com/go-macaron/macaron/pull/149, https://github.com/go-ini/ini/pull/115). Even if in the short-term we have to make the change to gitea, I do think we should ultimately try to add caching to macaron (which is where it really belongs)
Fair enough. I've created an issue for it on the macaron repository: https://github.com/go-macaron/macaron/issues/152 should the owner come back, I'll be very glad to port over the feature there.
Example when loading my try.gitea.io dashboard:
This leads to some pretty poor performance when loading the page. On multiple retries, avatars served from try.gitea.io directly are never cached - which is pretty bad. This seems to be an issue with macaron's static file server itself, since as far as I can tell it never e.g. checks for the ETag on the request - only sends it. There is also no Expires header, which would be pretty nice to set for at least some time (e.g. an hour).
The best way to go here to me seems to copy the static file serving function and suit it to Gitea's needs altogether - seeing as I doubt unknwon will merge PRs to macaron (due to his current inactivity)