Sha256: 5adb05a3dd596b36a253713789b8cee5f9c0947cc4449b91c27dac5703d64376
Contents?: true
Size: 618 Bytes
Versions: 10
Compression:
Stored size: 618 Bytes
Contents
# frozen_string_literal: true module Aws module S3 # @api private class ExpressCredentialsCache def initialize @credentials = {} @mutex = Mutex.new end def [](bucket_name) @mutex.synchronize { @credentials[bucket_name] } end def []=(bucket_name, credential_provider) @mutex.synchronize do @credentials[bucket_name] = credential_provider end end def clear @mutex.synchronize { @credentials = {} } end end # @api private EXPRESS_CREDENTIALS_CACHE = ExpressCredentialsCache.new end end
Version data entries
10 entries across 10 versions & 1 rubygems