Hacker News new | ask | show | jobs
by rmetzler 1276 days ago
I don't know why you want to hurt yourself.

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.