I have a Node.js application where each individual page has a logged in user view and a visitor view. I would like the caching to behave differently in such cases. In particular:
I would like Fastly to do the following:
- If a session cookie called connect.sid does not exist, fetch from the cache. (no session)
- If a session cookie called connect.sid exists, but its value is null, fetch from the cache. (no session)
- If a session cookie called connect.sid exists, and has a non-zero value, forward to origin, and do not cache. (valid session)
Can anyone help me with a VCL example for this, and how I can add it to Fastly?
Please sign in to leave a comment.