2 -- 2003-03-22 <brion@pobox.com>
4 -- Add 'last touched' fields to cur and user tables.
5 -- These are useful for maintaining cache consistency.
6 -- (Updates to OutputPage.php and elsewhere.)
8 -- cur_touched should be set to the current time whenever:
9 -- * the page is updated
10 -- * a linked page is created
11 -- * a linked page is destroyed
13 -- The cur_touched time will then be compared against the
14 -- timestamps of cached pages to ensure consistency; if
15 -- cur_touched is later, the page must be regenerated.
17 ALTER TABLE /*$wgDBprefix*/cur
18 ADD COLUMN cur_touched binary(14) NOT NULL default '';
20 -- Existing pages should be initialized to the current
21 -- time so they don't needlessly rerender until they are
22 -- changed for the first time:
24 UPDATE /*$wgDBprefix*/cur
25 SET cur_touched=NOW()+0;
27 -- user_touched should be set to the current time whenever:
29 -- * the user saves preferences (if no longer default...?)
30 -- * the user's newtalk status is altered
32 -- The user_touched time should also be checked against the
33 -- timestamp reported by a browser requesting revalidation.
34 -- If user_touched is later than the reported last modified
35 -- time, the page should be rerendered with new options and
38 ALTER TABLE /*$wgDBprefix*/user
39 ADD COLUMN user_touched binary(14) NOT NULL default '';
40 UPDATE /*$wgDBprefix*/user
41 SET user_touched=NOW()+0;