Make WANObjectCache sets account for slave lag
[lhc/web/wiklou.git] / includes / filerepo / file / LocalFile.php
index 1bccf81..6208f2f 100644 (file)
@@ -309,7 +309,7 @@ class LocalFile extends File {
 
                // Cache presence for 1 week and negatives for 1 day
                $ttl = $this->fileExists ? 86400 * 7 : 86400;
-               $opts = array( 'since' => wfGetDB( DB_SLAVE )->trxTimestamp() );
+               $opts = DatabaseBase::getCacheSetOptions( $this->repo->getSlaveDB() );
                ObjectCache::getMainWANInstance()->set( $key, $cacheVal, $ttl, $opts );
        }