Simple memory backed cache. This cache is not thread safe and is intended only for serving as a temporary memory cache for a single thread.
Methods
- C
- D
- N
- R
- W
Class Public methods
Source: show
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 14 def initialize super @data = {} end
Instance Public methods
Source: show
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 24 def clear(options = nil) @data.clear end
Source: show
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 37 def delete_entry(key, options) !!@data.delete(key) end
Source: show
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 28 def read_entry(key, options) @data[key] end
Source: show
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 32 def write_entry(key, value, options) @data[key] = value true end