commercialhaskell / commercialhaskell/stackage-server
Cache multi-representation endpoints
- Dominant language
- Haskell
- Stars
- 108
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
### Context
Stackage uses Cloudflare as a CDN. In the Free tier, which Stackage has, you cannot use the Accept header as a cache key. This causes collisions if any page responds with different data depending on that header. A request to such a page will randomly get the wrong response, depending on what is cached.
### Problem
Stackage has two remaining endpoints that do this: `/#SnapName` and `/diff/#SnapName/#SnapName`. Right now, they are simply *not cached* to avoid returning the wrong data.
### Path forward
We either need to gracefully remove these endpoints—replacing them with fixed-representation ones—or change/upgrade our caching provider.
Haskell.org has its own, sponsored Cloudflare account with the necessary feature. They also have a Fastly account that presumably also has the necessary feature. Perhaps it's time to move Stackage.org into one of those accounts.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.