Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/247967
Change subject: Fix S3 backend to use WANObjectCache per the parent class ...................................................................... Fix S3 backend to use WANObjectCache per the parent class Change-Id: I5d1df1d06dbba8d6d1aca6f9a6dfbb61a34a0ec1 --- M s3/AmazonS3FileBackend.php 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AWS refs/changes/67/247967/1 diff --git a/s3/AmazonS3FileBackend.php b/s3/AmazonS3FileBackend.php index 76a0948..b160376 100644 --- a/s3/AmazonS3FileBackend.php +++ b/s3/AmazonS3FileBackend.php @@ -68,6 +68,7 @@ * * awsHttps - Whether to use HTTPS for AWS connections (defaults to $wgAWSUseHTTPS) * * awsEncryption - Whether to turn on server-side encryption on AWS (implies awsHttps=true) * + * @param array $config * @throws MWException if no containerPaths is set */ function __construct( array $config ) { @@ -85,7 +86,11 @@ $this->useHTTPS = (bool)$wgAWSUseHTTPS; } - $this->memCache = wfGetMainCache(); + // Cache container information to mask latency + if ( isset( $config['wanCache'] ) && $config['wanCache'] instanceof WANObjectCache ) { + $this->memCache = $config['wanCache']; + } + $this->client = S3Client::factory( array( 'key' => isset( $config['awsKey'] ) ? $config['awsKey'] : $wgAWSCredentials['key'], 'secret' => isset( $config['awsSecret'] ) ? $config['awsSecret'] : $wgAWSCredentials['secret'], -- To view, visit https://gerrit.wikimedia.org/r/247967 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5d1df1d06dbba8d6d1aca6f9a6dfbb61a34a0ec1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AWS Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits