Commit Graph

6 Commits

Author SHA1 Message Date
flow
ab6e1b112b
change(cache): use cache-specific http headers for their lifetime
This uses the 'Age', 'Cache-Control' and 'Expires' HTTP headers to more
accurately set up the cache lifetime, falling back to a static 1-week
time if they're not present in the response.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-21 19:19:24 -03:00
flow
ec87a8ddfc
fix: add expiration time to cache entries
This is to prevent problems where the cache entry would still be used
way after the remote resource got updated. The limit is hardcoded for 1
week, which I think is a reasonable time, but this could be further
tweaked.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-16 21:25:28 -03:00
flow
0bce08d30f
chore: add polymc license headers to launcher/net files 2022-05-12 18:11:55 -03:00
flow
040ee919e5
refactor: more net cleanup
This runs clang-tidy on some other files in launcher/net/.

This also makes use of some JSON wrappers in HttpMetaCache, instead of
using the Qt stuff directly.

Lastly, this removes useless null checks (crashes don't occur because of
this, but because of concurrent usage / free of the QByteArray pointer),
and fix a fixme in Download.h
2022-05-12 18:11:55 -03:00
Petr Mrázek
69213b1206 NOISSUE continue refactoring things to make tests pass 2021-11-21 23:21:12 +01:00
Petr Mrázek
20b9f2b42a NOISSUE Flatten gui and logic libraries into MultiMC 2021-07-25 19:50:44 +02:00