fonsleenaars / tqdb

Python parser for the Titan Quest Anniversary Edition, Ragnarok, Atlantis, Eternal Ember DLC database.
https://tq-db.net
MIT License
50 stars 15 forks source link

Please increase http cache expiry time #40

Closed KoderKrazy closed 5 years ago

KoderKrazy commented 6 years ago

After every 24hr, the big png and bundle.js takes too much time to load on wifi and metered connections on mobile. Both of them combined are >7mb.

I think the cache expires every 24hr in chrome. I tried plugins to increase the cache time but it doesn't work. If you could increase the expiry time by one week or a month it would be great.

e.g add something like this: 30 DAYS location ~* .(png|gif|js|css|swf)$ { add_header Cache-Control "max-age=2592000, public" }

fonsleenaars commented 6 years ago

I'll update the configuration with the next deployment to increase the expiry time, thanks for the suggestion!

fonsleenaars commented 5 years ago

It has been increased for the staging environment where I'm testing the 1.2.0 release. This will be copied over to the production environment upon deployment.

I'll set it to a month to start and probably a year later, because the deployment generates new random filenames for the assets to ensure they're always the latest per release.

Thanks for reporting the issue & providing a solution at the same time 🙂

fonsleenaars commented 5 years ago

This has been implemented on both production and staging.