|
|
|
|
|
by nnadams
1268 days ago
|
|
Is it possible for CDNs to cache per URL per user? I'm thinking of something like /favorites where one URL would list something different for everyone. When I've setup caching on backend it was keyed off the user. This was a very informative read! |
|
If these are public, put them on /favorites/$USERNAME or something similar. If they are private, don't cache them.
You can cache with specific headers as cache keys, but I would advise against doing this too much / abusing it. It really makes caching complicated. And from a data privacy standpoint it's better to opt-in into caching. I've witnessed incidents where visitors saw the private profile page of another user, because it was cached in the CDN.