I have a multi lingual joomla site that uses Joomfish for translations. Due to Joomfish using a cookie to change language and not a different url I have had major issues getting this to work. However I have found a way to get round it by getting varnish to check the cookie value, if english serve cache, if anything else then pass to server.
Thats great, but I want to be able to cache the other versions. Is there a way to serve a different cache to different languages. So a cached version of german, french etc.
I have tried using different nginx config files and setting different varnish back ends but that didnt seem to work.
For that I did:
/* default is english */
backend default {
.host = "127.0.0.1";
.port = "8080";
}
/* french backend */
backend french {
.host = "127.0.0.1";
.port = "8081";
}
Then in my sub recv
function:
if(req.http.cookie ~ "jfcookie\[lang\]=fr"){
set req.backend = french;
}
That seems to serve the same cached backend though. So if your on french it sends you to english content.