module Mongo::Auth::CredentialCache
Cache store for computed SCRAM credentials.
@api private
Attributes
Public Instance Methods
Source
# File lib/mongo/auth/credential_cache.rb, line 37 def cache(key) value = get(key) if value.nil? value = yield set(key, value) end value end
Source
# File lib/mongo/auth/credential_cache.rb, line 27 def get(key) @store ||= {} @store[key] end
Source
# File lib/mongo/auth/credential_cache.rb, line 32 def set(key, value) @store ||= {} @store[key] = value end