mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 08:07:17 +08:00
PERF: Improve cook_url performance for topic thumbnails (#11609)
- Only initialize the S3Helper when needed - Skip initializing the S3Helper for S3Store#cdn_url - Allow cook_url to be passed a `local` hint to skip unnecessary checks
This commit is contained in:
@ -6,7 +6,7 @@ require 'file_store/local_store'
|
||||
|
||||
describe FileStore::S3Store do
|
||||
let(:store) { FileStore::S3Store.new }
|
||||
let(:s3_helper) { store.instance_variable_get(:@s3_helper) }
|
||||
let(:s3_helper) { store.s3_helper }
|
||||
let(:client) { Aws::S3::Client.new(stub_responses: true) }
|
||||
let(:resource) { Aws::S3::Resource.new(client: client) }
|
||||
let(:s3_bucket) { resource.bucket("s3-upload-bucket") }
|
||||
|
Reference in New Issue
Block a user