by sync · 15y ago · 0 comments
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.