Will the old configuration style for http caching continue to be supported indefinitely?
Will the old configuration style for http caching continue to be supported indefinitely?
I love Varnish, but it's completely inflexible in Heroku so it's always been a mixed blessing. Sticking Google Analytics on your page, for instance, creates cookies for users that mean they will no longer get cached content. It's something that I can work around with dedicated Varnish, but Heroku can't really fix for me.
We've are running production apps with Varnish caching + Google Analytics without issue.
Set your cookies with JS or on uncached pages (such as POST logins) and you'll be fine.
You can set cookies on uncached pages in ruby and read them without issue in JS on Varnish cached pages. The page will still be cached even if the user has a session cookie.
Basically: don't set or get cookies in ruby on cached pages and you'll be fine.
"The new HTTP stack does not include Varnish (a reverse proxy cache) because it is not compatible with the advanced HTTP features described above. If you wish use HTTP caching headers, rack-cache and the memcache add-on offer features and performance comparable to Varnish, but with the additional benefit of giving you complete control over authentication and page expiration."
(Begs the question though: What are we doing serving pages >1MB?)