Closed jasontbradshaw closed 11 years ago
I think this is an nginx config, and one that @jossim had but removed per our prior discussion. It can make sense to have it for a few minutes, but since communites.json is served via nginx it's not super important.
I think something as low as one minute would be fine, maybe even just 30 seconds. This would greatly speed up the experience for people who go to the iframed site, then click "View in full-screen", which according to our analytics is a large proportion (more than 20%) of users. If it was cached, they wouldn't have to wait for another several seconds to get the page, since their browser would just serve it from memory.
Yep I think that's the right choice. Joseph was right when he first did it, though it should be at a lower expiration time (a few minutes)
Elben
On Tue, Sep 10, 2013 at 10:23 AM, Jason T. Bradshaw < notifications@github.com> wrote:
I think something as low as one minute would be fine, maybe even just 30 seconds. This would greatly speed up the experience for people who go to the iframed site, then click "View in full-screen", which according to our analytics is a large proportion (more than 20%) of users. If it was cached, they wouldn't have to wait for another several seconds to get the page, since their browser would just serve it from memory.
— Reply to this email directly or view it on GitHubhttps://github.com/eshira/mc-map/issues/52#issuecomment-24169224 .
For /communities.json
I've added Cache-Control: max-age=420, public, must-revalidate
. This says to cache for 7 minutes (which is slightly longer than the average time on the site) then check again.
This page should really be cached for at least a few minutes (5?) so when people reload the page (to get to the full screen version, for example) it doesn't cause a new hit.