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 cache headers to static files and etags to performer images #337

Merged
merged 1 commit into from Jan 31, 2020

Conversation

ghost
Copy link

@ghost ghost commented Jan 28, 2020

Adds one week cache headers to all files served from /static//. All of the css/js assets are hashed by webpack, so there's no risk of a stale cache.

Also adds etags to performer images based on the md5 of the image. Since the tag is the hash it should also never go stale.

Both taken together shaves the load time of my /performerspage from 1500 to ~500ms when the cache is hot.

@bnkai bnkai added the improvement Something needed tweaking. label Jan 28, 2020
@bnkai
Copy link
Collaborator

bnkai commented Jan 29, 2020

It seems to work ok.
The difference in load time / payload is more evident when the perfomer images are pngs / bigger in size.

@WithoutPants WithoutPants mentioned this pull request Jan 30, 2020
10 tasks
@Leopere Leopere merged commit cd9c6e9 into stashapp:develop Jan 31, 2020
Tweeticoats pushed a commit to Tweeticoats/stash that referenced this pull request Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Something needed tweaking.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants