Method: AWS::EC2::TaggedItem#cached_tags

Defined in:
lib/aws/ec2/tagged_item.rb

#cached_tagsObject



64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/aws/ec2/tagged_item.rb', line 64

def cached_tags
  if cache = AWS.response_cache
    cache.select(describe_call_name.to_sym).each do |resp|
      if obj = find_in_response(resp)
        return obj.tag_set.inject({}) do |hash, tag|
          hash[tag.key] = tag.value
          hash
        end
      end
    end
  end
  nil
end