I was going to provide a specific parameter for it. That entire key sucks
though anyway, I should probably ditch the md5()'d URL in favor of using
the actual name. Fwiw: I've got a patch working, but I'm not quite ready
to commit it yet. While we're at it, are we sure we want to use $wgLang and
not $wgContLang? Image description pages are "content", not a part of
the interface. That being said, I would think it would be best to fetch the
information using the wiki's content language.

-Chad

On Mon, Jan 26, 2009 at 12:16 PM, Marcus Buck <[email protected]> wrote:

> Chad hett schreven:
> > 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
>
> > and you'll get the last cached version, whatever the language.
> >
> The cache key is set with
>
> $key = wfMemcKey( 'RemoteFileDescription', 'url', md5($renderUrl) );
>
> in File.php. $renderUrl is the return value of
> 'getDescriptionRenderUrl': e.g.
> "
> http://commons.wikimedia.org/wiki/Image:foobar.jpg?action=render&uselang=xyz
> ".
> The language is present in the key. So I still fail to understand the
> big difference. Why would I still get the last cached version whatever
> the language is?
> Providing the language as parameter might be a little more elegant, but
> it should not affect the functionality.
>
> Marcus Buck
>
>
> _______________________________________________
> Wikitech-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to