[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/maintenance/archives/ -> patch-cache.sql (source)

   1  -- patch-cache.sql
   2  -- 2003-03-22  <[email protected]>
   3  --
   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.)
   7  --
   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
  12  --
  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.
  16  
  17  ALTER TABLE /*$wgDBprefix*/cur
  18    ADD COLUMN cur_touched binary(14) NOT NULL default '';
  19  
  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:
  23  
  24  UPDATE /*$wgDBprefix*/cur
  25    SET cur_touched=NOW()+0;
  26  
  27  -- user_touched should be set to the current time whenever:
  28  --  * the user logs in
  29  --  * the user saves preferences (if no longer default...?)
  30  --  * the user's newtalk status is altered
  31  --
  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
  36  -- sent again.
  37  
  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;


Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1