Lets say hypothetically your app makes the front page of reddit, and you've got no caching in place yet. Lets say that the page is "static enough" for signed out users, and you want them off your rails stack.
This cap task/nginx conf combo will let you do that in a hurry.
Essentially:
- the nginx config will preferentially serve files from a public/cache_zone folder ahead of regular public lookups for static content
- the nginx config will also set the cache zone depending on if you have an auth cookie ("remember_user_token" in our case)
- the cap task ssh's to your app box and curls the content into the public/signed_out folder
- now all users without an auth cookie will get the static html
- voila, webscale