You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
FWIW, I have succeeded in making contribution to unknwon's repos in the past (go-macaron/macaron#149, go-ini/ini#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: go-macaron/macaron#152 should the owner come back, I'll be very glad to port over the feature there.
* Enable caching on assets and avatars
Fixes#3323
* Only set avatar in user BeforeUpdate when there is no avatar set
* add error checking after stat
* gofmt
* Change cache time for avatars to an hour
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)
The text was updated successfully, but these errors were encountered: