[Wikipedia-l] Tech update; programmers only! ;)

Magnus Manske Magnus.Manske at epost.de
Thu Feb 7 21:31:39 UTC 2002


I just updated the CVS with the caching mechanism I proposed on the tech
talk page.

It is deactivated by default, because you need to alter your database prior
to use.

To activate:
1. In mysql, add the field cur_cache:
	ALTER TABLE cur ADD cur_cache MEDIUMTEXT
2. Edit wikiText.php and remove the # from the last coding line, so that it
reads
	$useCachedPages = true ;

The one thing I didn't implement is the regular "forced update" of the
cache. This could be done by counting the views and flushing the cache
after, say, 50 views. It could also be time-based, so it is refereshed if
the cache is more than two weeks old. (just example values)

Note that pages with variables (like the Main Page with
{{NUMBEROFARTICLES}}) are *not* cached.


I noticed a slight performance improvement at my machine (~15%) when reading
a cached page, and no noticable delay on saving the cache.


"The Need For Speed" continues on this channel ;)

Magnus




More information about the Wikipedia-l mailing list