On Mon, Jan 26, 2009 at 11:30 AM, Marcus Buck wiki@marcusbuck.org wrote:
Chad hett schreven:
Wouldn't exactly work. You'd need to cache per-language, or otherwise all users would get the latest cached version, whatever it happens to be. We should probably pass the language as a parameter, so it can be called there appropriately. We'll cache it a level above, which I believe is where it's done right now.
-Chad
First: Sorry, that the code wasn't that legible. It looked fine and changes were highlighted when I send it, but I didn't bear in mind, that the list is text-only. I don't understand your concern. The language _is_ passed via the URL. A user with another language set in the preferences will access another URL and will thus have another cache key. The keys will only match, if the language set in preferences is identical. Or where I am wrong?
Marcus Buck
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
It doesn't have to do with what the language preference is, we're just checking based *on* language. My point is that getDescriptionRenderUrl() shouldn't be checking $wgLang itself, it should be getting the language passed as a parameter (in addition to $name). This way, we can properly cache the description page (in File::getDescriptionText()) by language. Otherwise, the cache won't be accurate, and you'll get the last cached version, whatever the language. By adding per-language caching on this, we can make it work effectively.
-Chad