@private
# File lib/aws/core/resource_cache.rb, line 20 def initialize @cache = {} end
# File lib/aws/core/resource_cache.rb, line 28 def cached?(key, attribute) attributes = @cache[key] and attributes.has_key?(attribute) end
# File lib/aws/core/resource_cache.rb, line 32 def get(key, attribute) raise "No cached value for attribute :#{attribute} of #{key}" unless cached?(key, attribute) @cache[key][attribute] end
# File lib/aws/core/resource_cache.rb, line 24 def store(key, attributes) (@cache[key] ||= {}).merge!(attributes) end