On 10.07.2012 15:49, bawolff wrote:
>> * the parser cache, containing the HTML for every page's content. This cache
>> uses keys based on the ParserOptions, which includes a field for specifying
>> the
>> language. However, currently only a "canonical" version of the rendered page
>> is
>> cached, disregarding the user language.
>
>
> That's not entirely true. In cases where the page differs depending on
> language ( {{int:...}}, Pages with the babel extension
> depending on config of that extension), we split the parser cache
> based on user language
>
> Well those might seem like small cases, I would guess (to pull a
> number out of nowhere, so probably wrong) that at least
> 75% of pages on commons have the parser cache split by user language.
Thanks for pointing that out, we should look into this mechanism!
>> * anonymous with language cookie: vary cache on the language in the cookie,
>> keep
>> URL unchanged
>> * logged in with language cookie: once squid cache is implemented for logged
>> in
>> users, vary cache on the language in the cookie, keep URL unchanged. Until
>> then,
>> bypass the cache.
>> * anonymous with no cookie set (first access, or the user agent doesn't
>> support
>> cookies): this should use the primary content language (english). Squids
>> could
>> also detect the user language somehow, set the cookie, and only then pass the
>> request to the app server - this would be nice, but puts app logic into the
>> squids. Can be added later if desired, MediaWiki is oblivious to this.
>> * logged in with no cookie: skip cache. the response will depend on the
>> user's
>> language preference stored in the database, caching it without the language
>> cookie to vary on would poison the cache. We could try to come up with a
>> scheme
>> to mitigate the overhead this generates, but that only becomes relevant once
>> squid layer caching is supported for logged in users at all.
>>
>> So, that's it: no parser cache, split squid cache, use cookie smartly.
>>
>> What do you think? Does that sound good to you?
>>
>> -- daniel
>
> Does this imply anon users can some how have a language set via a
> cookie?
yes.
> As it stands you need to be logged in to
> have a lang preference. Are there concrete plans to have squid servers
> start partially caching pages for logged in users?
> (And if so are we including the content area of the page with that?).
yes, as far as I understood Ryan.
-- daniel
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l