Skip to content

Avatars uploaded to instance are not cached #3323

Closed
@thehowl

Description

@thehowl

Example when loading my try.gitea.io dashboard:

image

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions