I’ve struggled with this for some time - so wondered what other people think.
Simplest option is to remove SQUID and stop caching once users login. So Matrix runs all conditional usergroup bits and pieces and logged in users always see the correct content.
However that’s not really an option for us - without SQUID some data heavy pages can take a very long time to load.
In addition - all logged in users see the same content anyway (it’s not personalised to individuals) - so I think it makes sense to utilise SQUID if possible.
The options seem to be:
-
Use a subdomain EG: members.mysite.com
Have users redirected once logged in - and have all the conditional stuff based on whether the domain is “members.”
SQUID caches the members. url differently to www. -
Use folder structure EG: www.mysite.com/members/
Use contexts to have users redirected on login and to show alternative content
SQUID caches the urls differently -
Use a query string EG: www.mysite.com?member=yes
Have users redirected once logged in - and have all the conditional stuff based on whether the query string contains “members=yes”
SQUID caches the url with the query string as a unique url
Obviously there’s a bunch of other stuff to think about:
- Redirecting logged in / not logged in users
- Do members need to view ALL pages using the new urls - or just the pages with additional members content (there’s more chance of the public pages being cached)
What do you think is the preferred option with Matrix? (I’m leaning towards version 2)
What are the important other factors that should be considered?
Thoughts / advice / experience gratefully received as always
Karl