Aryeh Gregor wrote:
> On Sat, Jun 4, 2011 at 6:54 PM, Platonides<platoni...@gmail.com>  wrote:
>> No.
>> Currently it would mean not caching any page view.
>> The feature would need to be adapted to allow efficient stub linking
>> (I have some ideas about it, and the new linker makes things easier).
>
> What were you thinking of?

Depending on page cacheability:

1) If the page is not cached and won't be cached (render of old version, 
page preview...) create the stub links as we do now.

2) If the page can be cached,
Render it ignoring stub threshold if not cached.
else
Fetch html from cache.

If the user has a stub threshold different than 0, SELECT 
page_namespace,page_title FROM pagelinks JOIN page ON ... WHERE 
pl_from=$this->mArticleId AND page_len < $user->getStubThreshold();

For each of those stub pages: $a = Linker::Link() (ignoring stub 
threshold), $b = Linker::Link() (as stub).
Extract the open tag from $a and $b.
str_replace $a with $b in the html.

Bypassing the whole parsing structure in that way is not pretty, but 
it's really efficient.


_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to