Class: AWS::Flow::S3DataConverter::S3Cache

Inherits:
Object
  • Object
show all
Defined in:
lib/aws/decider/data_converter.rb

Overview

S3Cache is a wrapper around the LruRedux cache.

Constant Summary collapse

MAX_SIZE =
1000

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeS3Cache

Returns a new instance of S3Cache.



75
76
77
# File 'lib/aws/decider/data_converter.rb', line 75

def initialize
  @cache = LruRedux::ThreadSafeCache.new(MAX_SIZE)
end

Instance Attribute Details

#cacheObject (readonly)

Returns the value of attribute cache.



71
72
73
# File 'lib/aws/decider/data_converter.rb', line 71

def cache
  @cache
end

Instance Method Details

#[](key) ⇒ Object

Cache lookup



80
81
82
# File 'lib/aws/decider/data_converter.rb', line 80

def [](key)
  @cache[key]
end

#[]=(key, value) ⇒ Object

Cache entry



85
86
87
# File 'lib/aws/decider/data_converter.rb', line 85

def []=(key, value)
  @cache[key] = value
end