Use slave DB connections for LocalFile cache misses
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 23 Apr 2014 00:04:10 +0000 (17:04 -0700)
committerOri.livneh <ori@wikimedia.org>
Thu, 24 Apr 2014 05:55:21 +0000 (05:55 +0000)
commitbb0651087fd4bce952ba0312b39ba083b198702a
treeb465ae89a39f972ca37a0b8e1ca7e18b8cba6378
parentd48a02b68024ff85bb8d39c23197a6f221a64ede
Use slave DB connections for LocalFile cache misses

* Previously LocalFile cache misses would hit the master DB
  (even for shared repos like Commons).
* Since lock() is always called before file changes, this has
  been modified to call a new markVolatile() method to track
  changing (or recently changed) files in memcached. On cache
  miss this tracking is used to decide whether to use the
  slave or the master DB.

Change-Id: I942f5e28dd9e0953b6382cc2247ca480494d5718
includes/filerepo/file/LocalFile.php
includes/filerepo/file/OldLocalFile.php