commercialhaskell / commercialhaskell/stackage-server

Cache multi-representation endpoints

Open
#357 0 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.