Motivation
There are webs not worth updating WebStatistics such as the Trash web. When a web is deleted, it becomes a subweb of the Trash web. Currently, not only the Trash web but also subwebs of the Trash web are subject to
WebStatistics update.
You may think Trash web getting or not getting WebStatistics updated is not significant.
But actually, it can be.
In a large TWiki site where topics, attachments, and webs are deleted in large numbers, you may rotate Trash daily or weekly -- create an empty Trash after Trash gets moved to Trash1 after Trash1 gets moved to Trash2 ... after Trash9 gets moved to Trash10 after Trash10 gets deleted, for example. You end up having 11 Trash'es that way.
Besides, you may use multiple disks --
each disk needs its own Trash
(Trashx1x, Trashx2x, ...).
As such, if you use 3 disks and you do Trash rotation as mentioned above, you end up having 33 Trash'es.
Things get more complicated if you run a
federation of TWiki sites.
While ordinary webs have one master site, each site needs to have its own Trash webs.
Still, the
statistics script processes log files of all sites in the federation by mirroring log files of other sites in the federation.
Let's say site A's Trash has FooBar and Site B's Trash has FizzBuzz and both are viewed.
When site A has its
statistics script executed, it sees access to Trash.FizzBuzz in a log even though site A doesn't have the topic and hasn't had it viewed.
This is wrong though there is no practical issue.
In a site federation, you may have the Sandbox web in each site. And you may rotate the Sandbox web to prevent unaccounted-for topics from accumulating.
Description and Documentation
{Stats}{ExcludedWebRegex} will have a regular expression. Webs matching it don't have their WebStatistics updated. Access to those webs are reflected in the site statistics (Main.SiteStatistics).
Examples
To exclude Trash and Sandbox webs and rotated ones of them from WebStatistics update, you will have the following line in lib/LocalSite.cfg
$TWiki::cfg{Stats}{ExcludedWebRegex} = '^(Trash(x\d+x)?\d*|Sandbox\d*)\b';
Impact
Implementation
--
Contributors:
Hideyo Imazu - 2013-08-15
Discussion