I'm using subdomains in django for user pages via a middleware hack in a similar way to what is described here: stackoverflow.com/questions/624827/in-a-django-web-application-how-do-you-give-users-their-own-subdomain
Now, I have the default django cache turned on for all pages for not-logged-in users. I had to disable the cache implicitly for user pages as it treated those pages just as if they were the / pages, e.g. filmaster.com and michuk.filmaster.com is the same page to django.
Do you know of any nice and easy way to force django to understand subdomains for caching? Or do you suggest I just cache each of the subdomain views explicitly?
Update: actually looked into that solution (stackoverflow.com/questions/624827/in-a-django-web-application-how-do-you-give-users-their-own-subdomain) and it's not exactly how we do it. We do not redirect. We want the url to stay in subdomain, so what we do is just call the views directly from the middleware.
You can see the details of the hacky implementation here: musielak.eu/public/film20/film20/core/middleware.py (user: justlookingaround, pass:film@ster -- yes, we're open source). And here is a jira for fixing the hack: jira.filmaster.org/browse/FLM-54 (but that's not entirely relevant to the problem - it's just to make sure you don't think we support crappy coding :P)