impress-2020/src/server
Matchu d3b9f72e67 Add stale-while-revalidate cache headers
Oh yay, I'm pleased with this! I hope it works out well!

stale-while-revalidate is an HTTP caching feature that gives us the ability to still serve relatively static content like item pages ASAP, while also making sure users generally see updates quickly.

The trick is that we declare a period of time where, you can still serve the data from the cache, but you should _then_ go re-fetch the latest data in the background for next time. This works on end users and on the CDN!

I've scanned the basic wardrobe and homepage stuff and brought them up-to-date, and gave particular attention to the item page, which I hope can be very very snappy now! :3

Note to self: Vercel says we can manually clear out a stale-while-revalidate resource by requesting it with `Pragma: no-cache`. I'm not sure it will listen to us for _fresh_ resources, though, so I'm not sure we can actually use that to flush things out in the way I had been hoping until writing this sentence lol :p
2021-02-02 19:07:48 -08:00
..
__image_snapshots__ outfit-images: render actual PNG and SVG layers! 2021-01-04 05:58:19 +00:00
__snapshots__ simplify validPetPoses out of the server directory 2020-09-06 00:40:00 -07:00
lib Add stale-while-revalidate cache headers 2021-02-02 19:07:48 -08:00
query-tests perf upgrade for UserItemsPage 2020-11-24 21:03:45 -08:00
types Add stale-while-revalidate cache headers 2021-02-02 19:07:48 -08:00
auth.js simulate login with IMPRESS_LOG_IN_AS flag 2021-01-05 23:22:03 -08:00
db.js enable running against a local dev database 2020-10-06 06:18:19 -07:00
index.js Add stale-while-revalidate cache headers 2021-02-02 19:07:48 -08:00
loaders.js Add "Items you own" and "Items you want" filters 2021-01-21 15:58:24 -08:00
modeling.js disable new modeling code, until some future day 2020-10-07 07:49:27 -07:00
neopets-assets.js fix cache-asset-manifests script 2020-12-28 14:00:11 -08:00
outfit-images.js outfit-images: render actual PNG and SVG layers! 2021-01-04 05:58:19 +00:00
outfit-images.test.js outfit-images: render actual PNG and SVG layers! 2021-01-04 05:58:19 +00:00
util.js Add stale-while-revalidate cache headers 2021-02-02 19:07:48 -08:00
util.test.js add snapshot tests for loadBodyName 2020-08-21 16:22:16 -07:00