about summary refs log tree commit diff
path: root/users/Profpatsch/openlab-tools/src/OpenlabTools.hs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-10-20 r/6866 feat(users/Profpatsch/openlab-tools): introduce handler abstractionProfpatsch1-33/+97
I’ve been wanting to experiment with this stuff for a while, abstracting away a handler type. The existentials for parser and body took a bit of mucking about, but in the end hiding the variable behind a `Body` constructor did the trick. Now every handler has its own cache, which means we can start caching arbitrary results. Change-Id: If57230c47f97ef4c548683f2c2f27660817a31f2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9812 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2023-10-20 r/6865 fix(users/Profpatsch/openlab-tools): return 304 iff cache is sameProfpatsch1-6/+14
Now this is getting cool. After 5 minutes we will ask the backend again (which takes like 3 seconds), but then we compare the old cached result with the new result and only send it back to the client iff it changed. So the client will still have to wait for the roundtrip time, but doesn’t have to pay for the content. Plus, it gets some info that upstream hasn’t been updated. Change-Id: I6dba40321949da5da6a16b2e799d939573c77ba7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9811 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2023-10-20 r/6864 fix(users/Profpatsch/openlab-tools): add cache headersProfpatsch1-32/+107
This is a dumb experiment to see how hard it is to respect cache headers; turns out, medium hard but doable. Sets the correct expiry time according to the cache, plus respects `If-Modified-Since` which is a tiny bit harder. Change-Id: I9e6166af0fa254df2beb0f3919187b91a407487b Reviewed-on: https://cl.tvl.fyi/c/depot/+/9810 Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-10-20 r/6863 fix(users/Profpatsch/openlab-tools): add source to tableProfpatsch1-9/+24
Change-Id: Ia272460d098d2b25d3890853a3cd8e29ffb31545 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9809 Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-10-20 r/6862 fix(users/Profpatsch/openlab-tools): really deepseq cache contentProfpatsch1-5/+5
Okay, so I guess you also have to seq the cache and everything in between the IORef and the data. Change-Id: I4c79c99afbd09e83e9d7a01d58b31b36862e4d11 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9807 Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2023-10-20 r/6861 fix(users/Profpatsch/openlab-tools): deepseq cache contentProfpatsch1-3/+7
Otherwise the table might potentially hold onto data from the website request, it’s hard to say. Change-Id: I786478bd1ce2d9775b3d0b57565d79666ef8a96f Reviewed-on: https://cl.tvl.fyi/c/depot/+/9806 Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-10-20 r/6860 feat(users/Profpatsch/openlab-tools): contact infoProfpatsch1-0/+2
Change-Id: I51aeacbd553e56a69f9c9347296e758418325b20 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9805 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2023-10-20 r/6859 feat(users/Profpatsch/openlab-tools): main pageProfpatsch1-10/+76
Change-Id: I3e8b7ed9993268fab49050fb6894e3cc21e4a318 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9804 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2023-10-19 r/6858 feat(users/Profpatsch): init openlab-toolsProfpatsch1-0/+303
Back at my bullshit. Mostly copied the setup from whatcd-resolver. Change-Id: I9edd4387ee73c18816b1692d5338735536cce70f Reviewed-on: https://cl.tvl.fyi/c/depot/+/9803 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Autosubmit: Profpatsch <mail@profpatsch.de>