jenkins-bot has submitted this change and it was merged. Change subject: Use WAN cache adaptiveTTL() method in FileBackendStore ......................................................................
Use WAN cache adaptiveTTL() method in FileBackendStore Change-Id: I2e8b4e85b12c8892e8640abc63ee13b4b170645d --- M includes/filebackend/FileBackendStore.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/filebackend/FileBackendStore.php b/includes/filebackend/FileBackendStore.php index a29119c..db6575e 100644 --- a/includes/filebackend/FileBackendStore.php +++ b/includes/filebackend/FileBackendStore.php @@ -1702,8 +1702,8 @@ if ( $path === null ) { return; // invalid storage path } - $age = time() - wfTimestamp( TS_UNIX, $val['mtime'] ); - $ttl = min( 7 * 86400, max( 300, floor( .1 * $age ) ) ); + $mtime = wfTimestamp( TS_UNIX, $val['mtime'] ); + $ttl = $this->memCache->adaptiveTTL( $mtime, 7 * 86400, 300, .1 ); $key = $this->fileCacheKey( $path ); // Set the cache unless it is currently salted. $this->memCache->set( $key, $val, $ttl ); -- To view, visit https://gerrit.wikimedia.org/r/308291 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2e8b4e85b12c8892e8640abc63ee13b4b170645d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Krinkle <krinklem...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits